Magellan Linux

Contents of /tags/udev-162-r2/udev-kernel-compat.rules.magellan

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1129 - (show annotations) (download)
Mon Sep 13 21:44:07 2010 UTC (13 years, 6 months ago) by niro
File size: 3537 byte(s)
tagged 'udev-162-r2'
1 # /etc/udev/rules/30-kernel-compat.rules: kernel compat rules for udev
2 # $Header: /root/magellan-cvs/src/udev/udev-kernel-compat.rules.magellan,v 1.5 2010-08-18 02:24:12 niro Exp $
3 #
4 # There are a number of modifiers that are allowed to be used in some
5 # of the different fields. They provide the following subsitutions:
6 # %n - the "kernel number" of the device.
7 # For example, 'sda3' has a "kernel number" of '3'
8 # %k - the kernel name for the device.
9 # %M - the kernel major number for the device
10 # %m - the kernel minor number for the device
11 # %b - the bus id for the device
12 # %c - the string returned by the PROGRAM. (Note, this doesn't work within
13 # the PROGRAM field for the obvious reason.)
14 # %s{filename} - the content of a sysfs attribute.
15 # %% - the '%' char itself.
16 #
17 # Try not to modify this file, if you wish to change things, create a new rule
18 # file that can be run before this one.
19 #
20
21 ACTION=="remove", GOTO="kernel_compat_end"
22
23 #
24 # sysfs timing rules
25 #
26
27 # needed for kernels <2.6.30
28 SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", WAIT_FOR_SYSFS="descriptors"
29
30 #
31 # naming device rules
32 #
33
34 # dvb device naming
35 # needed for kernels <2.6.29-rc1
36 SUBSYSTEM=="dvb", ENV{DVB_ADAPTER_NUM}=="", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}'", NAME="%c", GROUP="video"
37
38 # naming rules for kernels <2.6.31
39
40 # alsa names
41 KERNEL=="controlC[0-9]*", NAME="snd/%k"
42 KERNEL=="hwC[D0-9]*", NAME="snd/%k"
43 KERNEL=="pcmC[D0-9cp]*", NAME="snd/%k"
44 KERNEL=="midiC[D0-9]*", NAME="snd/%k"
45 KERNEL=="timer", NAME="snd/%k"
46 KERNEL=="seq", NAME="snd/%k"
47
48 KERNEL=="mwave", NAME="modems/mwave"
49
50 KERNEL=="mouse*|mice|event*", NAME="input/%k"
51 KERNEL=="ts[0-9]*|uinput", NAME="input/%k"
52 KERNEL=="js[0-9]*", NAME="input/%k"
53
54 KERNEL=="card[0-9]*", NAME="dri/%k"
55
56 SUBSYSTEM=="dvb", ENV{DVB_ADAPTER_NUM}=="?*", NAME="dvb/adapter$env{DVB_ADAPTER_NUM}/$env{DVB_DEVICE_TYPE}$env{DVB_DEVICE_NUM}"
57
58 # libusb device nodes
59 SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}"
60
61 # printer
62 SUBSYSTEM=="usb", KERNEL=="lp*", NAME="usb/%k"
63
64 # block
65 KERNEL=="pktcdvd[0-9]*", NAME="pktcdvd/%k"
66 KERNEL=="pktcdvd", NAME="pktcdvd/control"
67
68 KERNEL=="rawctl", NAME="raw/rawctl"
69 SUBSYSTEM=="raw", KERNEL=="raw[0-9]*", NAME="raw/%k"
70 SUBSYSTEM=="bsg", NAME="bsg/%k"
71 SUBSYSTEM=="aoe", NAME="etherd/%k"
72
73 # network
74 KERNEL=="tun", NAME="net/%k"
75
76 # CPU
77 KERNEL=="cpu[0-9]*", NAME="cpu/%n/cpuid"
78 KERNEL=="msr[0-9]*", NAME="cpu/%n/msr"
79 KERNEL=="microcode", NAME="cpu/microcode", MODE="0600"
80
81 # miscellaneous
82 KERNEL=="auer[0-9]*", NAME="usb/%k"
83 KERNEL=="hw_random", NAME="hwrng"
84 KERNEL=="sxctl", NAME="specialix_sxctl"
85 KERNEL=="rioctl", NAME="specialix_rioctl"
86 KERNEL=="iowarrior[0-9]*", NAME="usb/%k"
87 KERNEL=="hiddev[0-9]*", NAME="usb/%k"
88 KERNEL=="legousbtower[0-9]*", NAME="usb/%k"
89 KERNEL=="dabusb[0-9]*", NAME="usb/%k"
90 KERNEL=="usbdpfp[0-9]*", NAME="usb/%k"
91 KERNEL=="cpad[0-9]*", NAME="usb/%k"
92
93 # end of naming rules for kernel <2.6.31
94
95
96 #
97 # module loading rules
98 #
99 ACTION!="add", GOTO="kernel_compat_end"
100
101 # No need for more code, as MODALIAS is present
102 ENV{MODALIAS}=="?*", GOTO="kernel_compat_end"
103
104 # needed for kernel <2.6.30-rc1
105 SUBSYSTEM=="scsi", ATTR{type}=="8", RUN+="/sbin/modprobe -b ch"
106 SUBSYSTEM=="mmc", RUN+="modprobe.sh -b mmc_block"
107
108 # needed for kernel <2.6.27-rc5
109 # acpi will do on newer kernels
110 SUBSYSTEM=="pnp", DRIVER!="?*", \
111 RUN{ignore_error}+="/bin/sh -c 'modprobe.sh -a $$(while read id; do echo pnp:d$$id; done < /sys$devpath/id)'"
112
113 LABEL="kernel_compat_end"