• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/router/udev/etc/udev/debian/
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# %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
13#
14
15# workaround for devices which do not report media changes
16SUBSYSTEMS=="ide", KERNEL=="hd[a-z]", ATTR{removable}=="1", \
17	ENV{ID_MODEL}=="IOMEGA_ZIP*",	NAME="%k", OPTIONS+="all_partitions"
18SUBSYSTEMS=="ide", KERNEL=="hd[a-z]", ATTRS{media}=="floppy", \
19	OPTIONS+="all_partitions"
20
21# SCSI devices
22SUBSYSTEMS=="scsi", KERNEL=="sr[0-9]*",	NAME="scd%n", SYMLINK+="sr%n"
23
24# USB devices
25SUBSYSTEMS=="usb", KERNEL=="auer[0-9]*",	NAME="usb/%k"
26SUBSYSTEMS=="usb", KERNEL=="cpad[0-9]*",	NAME="usb/%k"
27SUBSYSTEMS=="usb", KERNEL=="dabusb*",		NAME="usb/%k"
28SUBSYSTEMS=="usb", KERNEL=="hiddev*",		NAME="usb/%k"
29SUBSYSTEMS=="usb", KERNEL=="legousbtower*",	NAME="usb/%k"
30SUBSYSTEMS=="usb", KERNEL=="lp[0-9]*",		NAME="usb/%k"
31SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", \
32	ATTRS{product}=="Palm Handheld*|Handspring Visor|palmOne Handheld", \
33					SYMLINK+="pilot"
34
35# usbfs-like devices
36SUBSYSTEM=="usb_device",	PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", ACTION=="add", \
37				NAME="%c"
38
39# serial devices
40KERNEL=="capi",			NAME="capi20", SYMLINK+="isdn/capi20"
41KERNEL=="capi[0-9]*",		NAME="capi/%n"
42
43# video devices
44KERNEL=="dvb*",			PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}", ACTION=="add", \
45				NAME="%c"
46KERNEL=="card[0-9]*",		NAME="dri/%k"
47
48# misc devices
49KERNEL=="hw_random",		NAME="hwrng"
50KERNEL=="tun",			NAME="net/%k"
51KERNEL=="evtchn",		NAME="xen/%k"
52
53KERNEL=="cdemu[0-9]*",		NAME="cdemu/%n"
54KERNEL=="pktcdvd[0-9]*",	NAME="pktcdvd/%n"
55KERNEL=="pktcdvd",		NAME="pktcdvd/control"
56
57KERNEL=="cpu[0-9]*",		NAME="cpu/%n/cpuid"
58KERNEL=="msr[0-9]*",		NAME="cpu/%n/msr"
59KERNEL=="microcode",		NAME="cpu/microcode"
60
61KERNEL=="umad*",		NAME="infiniband/%k"
62KERNEL=="issm*",		NAME="infiniband/%k"
63KERNEL=="uverbs*",		NAME="infiniband/%k"
64KERNEL=="ucm*",			NAME="infiniband/%k"
65
66# ALSA devices
67KERNEL=="controlC[0-9]*",	NAME="snd/%k"
68KERNEL=="hwC[D0-9]*",		NAME="snd/%k"
69KERNEL=="pcmC[D0-9cp]*",	NAME="snd/%k"
70KERNEL=="midiC[D0-9]*",		NAME="snd/%k"
71KERNEL=="timer",		NAME="snd/%k"
72KERNEL=="seq",			NAME="snd/%k"
73
74# ieee1394 devices       
75KERNEL=="dv1394*",		NAME="dv1394/%n"
76KERNEL=="video1394*",		NAME="video1394/%n"
77
78# input devices
79KERNEL=="mice",			NAME="input/%k"
80KERNEL=="mouse[0-9]*",		NAME="input/%k"
81KERNEL=="event[0-9]*",		NAME="input/%k"
82KERNEL=="js[0-9]*",		NAME="input/%k"
83KERNEL=="ts[0-9]*",		NAME="input/%k"
84KERNEL=="uinput",		NAME="input/%k"
85
86# Zaptel
87KERNEL=="zapctl",		NAME="zap/ctl"
88KERNEL=="zaptimer",		NAME="zap/timer"
89KERNEL=="zapchannel",		NAME="zap/channel"
90KERNEL=="zappseudo",		NAME="zap/pseudo"
91KERNEL=="zap[0-9]*",		NAME="zap/%n"
92
93# AOE character devices
94SUBSYSTEM=="aoe", KERNEL=="discover",	NAME="etherd/%k"
95SUBSYSTEM=="aoe", KERNEL=="err",	NAME="etherd/%k"
96SUBSYSTEM=="aoe", KERNEL=="interfaces",	NAME="etherd/%k"
97SUBSYSTEM=="aoe", KERNEL=="revalidate",	NAME="etherd/%k"
98
99# device mapper creates its own device nodes, so ignore these
100KERNEL=="device-mapper",	NAME="mapper/control"
101
102