chiark / gitweb /
update Debian rules
[elogind.git] / etc / udev / debian / devfs.rules
1 # There are a number of modifiers that are allowed to be used in some
2 # of the different fields. They provide the following subsitutions:
3 #
4 # %n the "kernel number" of the device.
5 #    For example, 'sda3' has a "kernel number" of '3'
6 # %e the smallest number for that name which does not matches an existing node
7 # %k the kernel name for the device
8 # %M the kernel major number for the device
9 # %m the kernel minor number for the device
10 # %b the bus id for the device
11 # %c the string returned by the PROGRAM
12 # %s{filename} the content of a sysfs attribute
13 # %% the '%' char itself
14 #
15
16 # workaround for devices which do not report media changes
17 BUS=="ide", KERNEL=="hd[a-z]", SYSFS{removable}=="1", \
18         ENV{ID_MODEL}=="IOMEGA_ZIP*",   NAME="%k", OPTIONS+="all_partitions"
19
20 # IDE devices
21 BUS=="ide", KERNEL=="hd[a-z]*", PROGRAM="ide-devfs.sh %k %b %n", \
22                                         NAME="%c{1}", SYMLINK+="%k %c{2}"
23
24 # SCSI devices
25 BUS=="scsi", PROGRAM="scsi-devfs.sh %k %b %n", \
26                                         NAME="%c{1}", SYMLINK+="%k %c{2}"
27
28 # RAID controllers
29 KERNEL=="cciss!*|ida!*|rd!*", PROGRAM="raid-devfs.sh %k", \
30                                         NAME="%c{1}", SYMLINK+="%k"
31
32 # other block devices
33 KERNEL=="md[0-9]*",                     NAME="md/%n",
34 KERNEL=="loop[0-9]*",                   NAME="loop/%n"
35 KERNEL=="ram[0-9]*",                    NAME="rd/%n"
36
37 # USB devices
38 BUS=="usb", KERNEL=="auer[0-9]*",       NAME="usb/%k"
39 BUS=="usb", KERNEL=="cpad[0-9]*",       NAME="usb/%k"
40 BUS=="usb", KERNEL=="dabusb*",          NAME="usb/%k"
41 BUS=="usb", KERNEL=="hiddev*",          NAME="usb/%k"
42 BUS=="usb", KERNEL=="legousbtower*",    NAME="usb/%k"
43 BUS=="usb", KERNEL=="lp[0-9]*",         NAME="usb/%k"
44 BUS=="usb", KERNEL=="ttyUSB*", \
45         SYSFS{product}=="Palm Handheld*|Handspring Visor", \
46                                         SYMLINK+="pilot"
47
48 # usbfs-like devices
49 SUBSYSTEM=="usb_device",        PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", \
50                                 NAME="%c"
51
52 # serial devices
53 KERNEL=="ttyS[0-9]*",           NAME="tts/%n"
54 KERNEL=="ttyUSB[0-9]*",         NAME="tts/USB%n"
55 KERNEL=="rfcomm[0-9]*",         NAME="bluetooth/rfcomm/%n",
56 KERNEL=="capi",                 NAME="capi20", SYMLINK+="isdn/capi20"
57 KERNEL=="capi[0-9]*",           NAME="capi/%n"
58
59 # vc devices
60 KERNEL=="tty[0-9]*",            NAME="vc/%n"
61 KERNEL=="vcs",                  NAME="vcc/0"
62 KERNEL=="vcs[0-9]*",            NAME="vcc/%n"
63 KERNEL=="vcsa",                 NAME="vcc/a0"
64 KERNEL=="vcsa[0-9]*",           NAME="vcc/a%n"
65
66 # video devices
67 KERNEL=="video[0-9]*",          NAME="v4l/%k"
68 KERNEL=="radio[0-9]*",          NAME="v4l/%k"
69 KERNEL=="vbi[0-9]*",            NAME="v4l/%k"
70 KERNEL=="vtx[0-9]*",            NAME="v4l/%k"
71 KERNEL=="dvb*",                 PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}", \
72                                 NAME="%c"
73 KERNEL=="fb[0-9]*",             NAME="fb/%n"
74 KERNEL=="card[0-9]*",           NAME="dri/%k"
75
76 # misc devices
77 KERNEL=="apm_bios",             NAME="misc/%k",
78 KERNEL=="agpgart",              NAME="misc/%k"
79 KERNEL=="hw_random",            NAME="hwrng"
80 KERNEL=="nvram",                NAME="misc/%k"
81 KERNEL=="psaux",                NAME="misc/%k"
82 KERNEL=="rtc",                  NAME="misc/%k"
83 KERNEL=="tun",                  NAME="net/%k"
84
85 # printers and parallel devices
86 KERNEL=="lp[0-9]*",             NAME="printers/%n"
87 KERNEL=="parport[0-9]*",        NAME="parports/%n"
88
89 KERNEL=="i2c-[0-9]*",           NAME="i2c/%n"
90 KERNEL=="fd[0-9]*",             NAME="floppy/%n"
91
92 KERNEL=="cdemu[0-9]*",          NAME="cdemu/%n"
93 KERNEL=="pktcdvd[0-9]*",        NAME="pktcdvd/%n"
94 KERNEL=="pktcdvd",              NAME="pktcdvd/control"
95
96 KERNEL=="cpu[0-9]*",            NAME="cpu/%n/cpuid"
97 KERNEL=="msr[0-9]*",            NAME="cpu/%n/msr"
98 KERNEL=="microcode",            NAME="cpu/microcode"
99
100 KERNEL=="umad*",                NAME="infiniband/%k"
101 KERNEL=="issm*",                NAME="infiniband/%k"
102 KERNEL=="uverbs*",              NAME="infiniband/%k"
103 KERNEL=="ucm*",                 NAME="infiniband/%k"
104
105 # sound devices
106 KERNEL=="controlC[0-9]*",       NAME="snd/%k"
107 KERNEL=="hwC[D0-9]*",           NAME="snd/%k"
108 KERNEL=="pcmC[D0-9cp]*",        NAME="snd/%k"
109 KERNEL=="midiC[D0-9]*",         NAME="snd/%k"
110 KERNEL=="timer",                NAME="snd/%k"
111 KERNEL=="seq",                  NAME="snd/%k"
112 KERNEL=="audio*",               NAME="sound/%k"
113 KERNEL=="dsp*",                 NAME="sound/%k"
114 KERNEL=="adsp*",                NAME="sound/%k"
115 KERNEL=="midi*",                NAME="sound/%k"
116 KERNEL=="mixer*",               NAME="sound/%k"
117 KERNEL=="sequencer*",           NAME="sound/%k"
118 KERNEL=="amidi*",               NAME="sound/%k"
119 KERNEL=="dmmidi*",              NAME="sound/%k"
120 KERNEL=="admmidi*",             NAME="sound/%k"
121
122 # ieee1394 devices       
123 KERNEL=="dv1394*",              NAME="dv1394/%n"
124 KERNEL=="video1394*",           NAME="video1394/%n"
125
126 # input devices
127 KERNEL=="mice",                 NAME="input/%k"
128 KERNEL=="mouse[0-9]*",          NAME="input/%k"
129 KERNEL=="event[0-9]*",          NAME="input/%k"
130 KERNEL=="js[0-9]*",             NAME="input/%k"
131 KERNEL=="ts[0-9]*",             NAME="input/%k"
132 KERNEL=="uinput",               NAME="input/%k"
133
134 # Zaptel
135 KERNEL=="zapctl",               NAME="zap/ctl"
136 KERNEL=="zaptimer",             NAME="zap/timer"
137 KERNEL=="zapchannel",           NAME="zap/channel"
138 KERNEL=="zappseudo",            NAME="zap/pseudo"
139 KERNEL=="zap[0-9]*",            NAME="zap/%n"
140
141 # AOE character devices
142 SUBSYSTEM=="aoe", KERNEL=="discover",   NAME="etherd/%k"
143 SUBSYSTEM=="aoe", KERNEL=="err",        NAME="etherd/%k"
144 SUBSYSTEM=="aoe", KERNEL=="interfaces", NAME="etherd/%k"
145 SUBSYSTEM=="aoe", KERNEL=="revalidate", NAME="etherd/%k"
146
147 # device mapper creates its own device nodes, so ignore these
148 KERNEL=="dm-[0-9]*",            NAME=""
149 KERNEL=="device-mapper",        NAME="mapper/control"
150