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:
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
16 # workaround for devices which do not report media changes
17 BUS=="ide", KERNEL=="hd[a-z]", SYSFS{removable}=="1", \
18 PROGRAM="/sbin/ata_id --export $tempnode", ENV{ID_MODEL}=="IOMEGA_ZIP*", \
19 NAME="%k", OPTIONS+="all_partitions"
22 BUS=="ide", KERNEL=="hd[a-z]*", \
23 PROGRAM="/etc/udev/scripts/ide-devfs.sh %k %b %n", \
24 NAME="%c{1}", SYMLINK+="%k %c{2}"
27 BUS=="scsi", PROGRAM="/etc/udev/scripts/scsi-devfs.sh %k %b %n", \
28 NAME="%c{1}", SYMLINK+="%k %c{2}"
31 KERNEL=="cciss!*|ida!*|rd!*", PROGRAM="/etc/udev/scripts/raid-devfs.sh %k", \
32 NAME="%c{1}", SYMLINK+="%k"
35 KERNEL=="md[0-9]*", NAME="md/%n",
36 KERNEL=="loop[0-9]*", NAME="loop/%n"
37 KERNEL=="ram[0-9]*", NAME="rd/%n"
40 BUS=="usb", KERNEL=="auer[0-9]*", NAME="usb/%k"
41 BUS=="usb", KERNEL=="cpad[0-9]*", NAME="usb/%k"
42 BUS=="usb", KERNEL=="dabusb*", NAME="usb/%k"
43 BUS=="usb", KERNEL=="hiddev*", NAME="usb/%k"
44 BUS=="usb", KERNEL=="legousbtower*", NAME="usb/%k"
45 BUS=="usb", KERNEL=="lp[0-9]*", NAME="usb/%k"
46 BUS=="usb", KERNEL=="ttyUSB*", SYSFS{product}=="Palm Handheld*", \
50 SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'K=%k K=$${K#usbdev} B=$${K%%%%.*} D=$${K#*.}; echo bus/usb/$$B/$$D'", \
54 KERNEL=="ttyS[0-9]*", NAME="tts/%n"
55 KERNEL=="ttyUSB[0-9]*", NAME="tts/USB%n"
56 KERNEL=="rfcomm[0-9]*", NAME="bluetooth/rfcomm/%n",
57 KERNEL=="capi", NAME="capi20", SYMLINK+="isdn/capi20"
58 KERNEL=="capi[0-9]*", NAME="capi/%n"
61 KERNEL=="tty[0-9]*", NAME="vc/%n"
62 KERNEL=="vcs", NAME="vcc/0"
63 KERNEL=="vcs[0-9]*", NAME="vcc/%n"
64 KERNEL=="vcsa", NAME="vcc/a0"
65 KERNEL=="vcsa[0-9]*", NAME="vcc/a%n"
68 KERNEL=="video[0-9]*", NAME="v4l/%k"
69 KERNEL=="radio[0-9]*", NAME="v4l/%k"
70 KERNEL=="vbi[0-9]*", NAME="v4l/%k"
71 KERNEL=="vtx[0-9]*", NAME="v4l/%k"
72 KERNEL=="dvb*", PROGRAM="/bin/sh -c 'KNAME=%k KNAME=$${KNAME#dvb} A=$${KNAME%%%%.*} D=$${KNAME#*.}; echo dvb/adapter$$A/$$D'", \
74 KERNEL=="fb[0-9]*", NAME="fb/%n"
75 KERNEL=="card[0-9]*", NAME="dri/%k"
78 KERNEL=="apm_bios", NAME="misc/%k",
79 KERNEL=="agpgart", NAME="misc/%k"
80 KERNEL=="hw_random", NAME="hwrng"
81 KERNEL=="nvram", NAME="misc/%k"
82 KERNEL=="psaux", NAME="misc/%k"
83 KERNEL=="rtc", NAME="misc/%k"
84 KERNEL=="tun", NAME="net/%k"
86 # printers and parallel devices
87 KERNEL=="lp[0-9]*", NAME="printers/%n"
88 KERNEL=="parport[0-9]*", NAME="parports/%n"
90 KERNEL=="i2c-[0-9]*", NAME="i2c/%n"
91 KERNEL=="fd[0-9]*", NAME="floppy/%n"
93 KERNEL=="cdemu[0-9]*", NAME="cdemu/%n"
94 KERNEL=="pktcdvd[0-9]*", NAME="pktcdvd/%n"
95 KERNEL=="pktcdvd", NAME="pktcdvd/control"
97 KERNEL=="cpu[0-9]*", NAME="cpu/%n/cpuid"
98 KERNEL=="msr[0-9]*", NAME="cpu/%n/msr"
99 KERNEL=="microcode", NAME="cpu/microcode"
101 KERNEL=="umad*", NAME="infiniband/%k"
102 KERNEL=="issm*", NAME="infiniband/%k"
103 KERNEL=="uverbs*", NAME="infiniband/%k"
104 KERNEL=="ucm", NAME="infiniband/%k"
107 KERNEL=="controlC[0-9]*", NAME="snd/%k"
108 KERNEL=="hwC[D0-9]*", NAME="snd/%k"
109 KERNEL=="pcmC[D0-9cp]*", NAME="snd/%k"
110 KERNEL=="midiC[D0-9]*", NAME="snd/%k"
111 KERNEL=="timer", NAME="snd/%k"
112 KERNEL=="seq", NAME="snd/%k"
113 KERNEL=="audio*", NAME="sound/%k"
114 KERNEL=="dsp*", NAME="sound/%k"
115 KERNEL=="adsp*", NAME="sound/%k"
116 KERNEL=="midi*", NAME="sound/%k"
117 KERNEL=="mixer*", NAME="sound/%k"
118 KERNEL=="sequencer*", NAME="sound/%k"
119 KERNEL=="amidi*", NAME="sound/%k"
120 KERNEL=="dmmidi*", NAME="sound/%k"
121 KERNEL=="admmidi*", NAME="sound/%k"
124 KERNEL=="dv1394*", NAME="dv1394/%n"
125 KERNEL=="video1394*", NAME="video1394/%n"
128 KERNEL=="mice", NAME="input/%k"
129 KERNEL=="mouse[0-9]*", NAME="input/%k"
130 KERNEL=="event[0-9]*", NAME="input/%k"
131 KERNEL=="js[0-9]*", NAME="input/%k"
132 KERNEL=="ts[0-9]*", NAME="input/%k"
133 KERNEL=="uinput", NAME="input/%k"
136 KERNEL=="zapctl", NAME="zap/ctl"
137 KERNEL=="zaptimer", NAME="zap/timer"
138 KERNEL=="zapchannel", NAME="zap/channel"
139 KERNEL=="zappseudo", NAME="zap/pseudo"
140 KERNEL=="zap[0-9]*", NAME="zap/%n"
142 # AOE character devices
143 SUBSYSTEM=="aoe", KERNEL=="discover", NAME="etherd/%k"
144 SUBSYSTEM=="aoe", KERNEL=="err", NAME="etherd/%k"
145 SUBSYSTEM=="aoe", KERNEL=="interfaces", NAME="etherd/%k"
147 # device mapper creates its own device nodes, so ignore these
148 KERNEL=="dm-[0-9]*", OPTIONS+="ignore_device"
149 KERNEL=="device-mapper", NAME="mapper/control"