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 # %k the kernel name for the device
7 # %M the kernel major number for the device
8 # %m the kernel minor number for the device
9 # %b the bus id for the device
10 # %c the string returned by the PROGRAM
11 # %s{filename} the content of a sysfs attribute
12 # %% the '%' char itself
15 # workaround for devices which do not report media changes
16 SUBSYSTEMS=="ide", KERNEL=="hd[a-z]", ATTR{removable}=="1", \
17 ENV{ID_MODEL}=="IOMEGA_ZIP*", NAME="%k", OPTIONS+="all_partitions"
18 SUBSYSTEMS=="ide", KERNEL=="hd[a-z]", ATTRS{media}=="floppy", \
19 OPTIONS+="all_partitions"
22 SUBSYSTEMS=="scsi", KERNEL=="sr[0-9]*", NAME="scd%n", SYMLINK+="sr%n"
25 SUBSYSTEMS=="usb", KERNEL=="auer[0-9]*", NAME="usb/%k"
26 SUBSYSTEMS=="usb", KERNEL=="cpad[0-9]*", NAME="usb/%k"
27 SUBSYSTEMS=="usb", KERNEL=="dabusb*", NAME="usb/%k"
28 SUBSYSTEMS=="usb", KERNEL=="hiddev*", NAME="usb/%k"
29 SUBSYSTEMS=="usb", KERNEL=="legousbtower*", NAME="usb/%k"
30 SUBSYSTEMS=="usb", KERNEL=="lp[0-9]*", NAME="usb/%k"
31 SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", \
32 ATTRS{product}=="Palm Handheld*|Handspring Visor|palmOne Handheld", \
36 SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", ACTION=="add", \
38 SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}"
41 KERNEL=="capi", NAME="capi20", SYMLINK+="isdn/capi20"
42 KERNEL=="capi[0-9]*", NAME="capi/%n"
45 KERNEL=="dvb*", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}", ACTION=="add", \
47 KERNEL=="card[0-9]*", NAME="dri/%k"
50 KERNEL=="hw_random", NAME="hwrng"
51 KERNEL=="tun", NAME="net/%k"
52 KERNEL=="evtchn", NAME="xen/%k"
54 KERNEL=="cdemu[0-9]*", NAME="cdemu/%n"
55 KERNEL=="pktcdvd[0-9]*", NAME="pktcdvd/%n"
56 KERNEL=="pktcdvd", NAME="pktcdvd/control"
58 KERNEL=="cpu[0-9]*", NAME="cpu/%n/cpuid"
59 KERNEL=="msr[0-9]*", NAME="cpu/%n/msr"
60 KERNEL=="microcode", NAME="cpu/microcode"
62 KERNEL=="umad*", NAME="infiniband/%k"
63 KERNEL=="issm*", NAME="infiniband/%k"
64 KERNEL=="uverbs*", NAME="infiniband/%k"
65 KERNEL=="ucm*", NAME="infiniband/%k"
66 KERNEL=="rdma_ucm", NAME="infiniband/%k"
69 KERNEL=="controlC[0-9]*", NAME="snd/%k"
70 KERNEL=="hwC[D0-9]*", NAME="snd/%k"
71 KERNEL=="pcmC[D0-9cp]*", NAME="snd/%k"
72 KERNEL=="midiC[D0-9]*", NAME="snd/%k"
73 KERNEL=="timer", NAME="snd/%k"
74 KERNEL=="seq", NAME="snd/%k"
77 KERNEL=="dv1394*", NAME="dv1394/%n"
78 KERNEL=="video1394*", NAME="video1394/%n"
81 KERNEL=="mice", NAME="input/%k"
82 KERNEL=="mouse[0-9]*", NAME="input/%k"
83 KERNEL=="event[0-9]*", NAME="input/%k"
84 KERNEL=="js[0-9]*", NAME="input/%k"
85 KERNEL=="ts[0-9]*", NAME="input/%k"
86 KERNEL=="uinput", NAME="input/%k"
89 KERNEL=="zapctl", NAME="zap/ctl"
90 KERNEL=="zaptimer", NAME="zap/timer"
91 KERNEL=="zapchannel", NAME="zap/channel"
92 KERNEL=="zappseudo", NAME="zap/pseudo"
93 KERNEL=="zap[0-9]*", NAME="zap/%n"
95 # AOE character devices
96 SUBSYSTEM=="aoe", KERNEL=="discover", NAME="etherd/%k"
97 SUBSYSTEM=="aoe", KERNEL=="err", NAME="etherd/%k"
98 SUBSYSTEM=="aoe", KERNEL=="interfaces", NAME="etherd/%k"
99 SUBSYSTEM=="aoe", KERNEL=="revalidate", NAME="etherd/%k"
101 # device mapper creates its own device nodes, so ignore these
102 KERNEL=="device-mapper", NAME="mapper/control"