chiark / gitweb /
Sync up the Debian rules files
[elogind.git] / etc / udev / debian / udev.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   PROGRAM="/etc/udev/scripts/ide-model.sh %k", RESULT=="IOMEGA ZIP *", \
19                                         NAME="%k", OPTIONS+="all_partitions"
20
21 # SCSI devices
22 BUS=="scsi", KERNEL=="sr[0-9]*",        NAME="scd%n", SYMLINK+="sr%n"
23
24 # USB devices
25 BUS=="usb", KERNEL=="hiddev*",          NAME="usb/%k"
26 BUS=="usb", KERNEL=="auer[0-9]*",       NAME="usb/%k"
27 BUS=="usb", KERNEL=="legousbtower*",    NAME="usb/%k"
28 BUS=="usb", KERNEL=="dabusb*",          NAME="usb/%k"
29 BUS=="usb", KERNEL=="cpad[0-9]*",       NAME="usb/%k"
30 BUS=="usb", KERNEL=="lp[0-9]*",         NAME="usb/%k"
31 BUS=="usb", KERNEL=="ttyUSB*", SYSFS{product}=="Palm Handheld*", \
32                                         SYMLINK+=="pilot"
33
34 # serial devices
35 KERNEL=="capi",                 NAME="capi20", SYMLINK+="isdn/capi20"
36 KERNEL=="capi[0-9]*",           NAME="capi/%n"
37
38 # video devices
39 KERNEL=="dvb*",                 PROGRAM="/etc/udev/scripts/dvb.sh %k", \
40                                 NAME="%c"
41 KERNEL=="card[0-9]*",           NAME="dri/%k"
42
43 # misc devices
44 KERNEL=="hw_random",            NAME="hwrng"
45 KERNEL=="tun",                  NAME="net/%k"
46
47 KERNEL=="cdemu[0-9]*",          NAME="cdemu/%n"
48 KERNEL=="pktcdvd[0-9]*",        NAME="pktcdvd/%n"
49 KERNEL=="pktcdvd",              NAME="pktcdvd/control"
50
51 KERNEL=="cpu[0-9]*",            NAME="cpu/%n/cpuid"
52 KERNEL=="msr[0-9]*",            NAME="cpu/%n/msr"
53 KERNEL=="microcode",            NAME="cpu/microcode"
54
55 KERNEL=="umad*",                NAME="infiniband/%k"
56 KERNEL=="issm*",                NAME="infiniband/%k"
57
58 # ALSA devices
59 KERNEL=="controlC[0-9]*",       NAME="snd/%k"
60 KERNEL=="hwC[D0-9]*",           NAME="snd/%k"
61 KERNEL=="pcmC[D0-9cp]*",        NAME="snd/%k"
62 KERNEL=="midiC[D0-9]*",         NAME="snd/%k"
63 KERNEL=="timer",                NAME="snd/%k"
64 KERNEL=="seq",                  NAME="snd/%k"
65
66 # ieee1394 devices       
67 KERNEL=="dv1394*",              NAME="dv1394/%n"
68 KERNEL=="video1394*",           NAME="video1394/%n"
69
70 # input devices
71 KERNEL=="mice",                 NAME="input/%k"
72 KERNEL=="mouse[0-9]*",          NAME="input/%k"
73 KERNEL=="event[0-9]*",          NAME="input/%k"
74 KERNEL=="js[0-9]*",             NAME="input/%k"
75 KERNEL=="ts[0-9]*",             NAME="input/%k"
76 KERNEL=="uinput",               NAME="input/%k"
77
78 # Zaptel
79 KERNEL=="zapctl",               NAME="zap/ctl"
80 KERNEL=="zaptimer",             NAME="zap/timer"
81 KERNEL=="zapchannel",           NAME="zap/channel"
82 KERNEL=="zappseudo",            NAME="zap/pseudo"
83 KERNEL=="zap[0-9]*",            NAME="zap/%n"
84
85 # AOE character devices
86 SUBSYSTEM=="aoe", KERNEL=="discover",   NAME="etherd/%k"
87 SUBSYSTEM=="aoe", KERNEL=="err",        NAME="etherd/%k"
88 SUBSYSTEM=="aoe", KERNEL=="interfaces", NAME="etherd/%k"
89
90 # device mapper creates its own device nodes, so ignore these
91 KERNEL=="dm-[0-9]*",            OPTIONS+="ignore_device"
92 KERNEL=="device-mapper",        NAME="mapper/control"
93