chiark / gitweb /
[PATCH] add cdsymlinks.sh support to gentoo rules file.
[elogind.git] / etc / udev / udev.rules.gentoo
1 # /etc/udev/udev.rules:  device naming rules for udev
2 #
3 # Gentoo specific rules, based a bit on devfs rules, but much simpler.
4 #
5 # There are a number of modifiers that are allowed to be used in some of the
6 # fields.  See the udev man page for a full description of them.
7
8
9 ###########################################################
10 #
11 # For devfs similar /dev layout (neater)
12 #
13 ###########################################################
14
15 # cdrom symlinks and other good cdrom naming
16 BUS="ide",  KERNEL="hd[a-z]",  PROGRAM="/etc/udev/scripts/cdsymlinks.sh %k", SYMLINK="%c{1} %c{2} %c{3} %c{4} %c{5} %c{6}"
17 BUS="scsi", KERNEL="sr[a-z]",  PROGRAM="/etc/udev/scripts/cdsymlinks.sh %k", SYMLINK="%c{1} %c{2} %c{3} %c{4} %c{5} %c{6}"
18 BUS="scsi", KERNEL="scd[a-z]", PROGRAM="/etc/udev/scripts/cdsymlinks.sh %k", SYMLINK="%c{1} %c{2} %c{3} %c{4} %c{5} %c{6}"
19
20 # devfs-names for ide-devices (uncomment only one)
21 #  /dev/ide/.../{disc,cd} and /dev/{cdroms,discs}/* type names
22 BUS="ide", KERNEL="hd*", PROGRAM="/etc/udev/scripts/ide-devfs.sh %k %b %n", NAME="%k", SYMLINK="%c{1} %c{2}"
23
24 # DRI devices
25 KERNEL="card*", NAME="dri/card%n"
26
27 # alsa devices
28 KERNEL="controlC[0-9]*", NAME="snd/%k"
29 KERNEL="hw[CD0-9]*",     NAME="snd/%k"
30 KERNEL="pcm[CD0-9cp]*",  NAME="snd/%k"
31 KERNEL="midiC[D0-9]*",   NAME="snd/%k"
32 KERNEL="timer",          NAME="snd/%k"
33 KERNEL="seq",            NAME="snd/%k"
34
35 # dm devices (ignore them)
36 KERNEL="dm-[0-9]*",     NAME=""
37 # create a symlink named after the device map name
38 # note devmap_name comes with extras/multipath
39 #KERNEL="dm-[0-9]*",     PROGRAM="/sbin/devmap_name %M %m", NAME="%k", SYMLINK="%c"
40 KERNEL="device-mapper", NAME="mapper/control"
41
42 # fb devices
43 KERNEL="fb[0-9]*", NAME="fb/%n", SYMLINK="%k"
44
45 # floppy devices
46 KERNEL="fd[0-9]*", NAME="floppy/%n", SYMLINK="%k"
47
48 # i2c devices
49 KERNEL="i2c-[0-9]*", NAME="i2c/%n", SYMLINK="%k"
50
51 # input devices
52 KERNEL="mice",          NAME="input/%k"
53 KERNEL="mouse*",        NAME="input/%k"
54 KERNEL="event*",        NAME="input/%k"
55 KERNEL="js*",           NAME="input/%k"
56 KERNEL="ts*",           NAME="input/%k"
57
58 # loop devices
59 KERNEL="loop[0-9]*", NAME="loop/%n", SYMLINK="%k"
60
61 # md block devices
62 KERNEL="md[0-9]*", NAME="md/%n", SYMLINK="%k"
63
64 # misc devices
65 KERNEL="agpgart",   NAME="misc/%k", SYMLINK="%k"
66 KERNEL="microcode", NAME="misc/%k", SYMLINK="%k"
67 KERNEL="psaux",     NAME="misc/%k", SYMLINK="%k"
68 KERNEL="rtc",       NAME="misc/%k", SYMLINK="%k"
69 KERNEL="uinput",    NAME="misc/%k", SYMLINK="%k"
70 KERNEL="inotify",   NAME="misc/%k", SYMLINK="%k"
71
72 # pty devices
73 KERNEL="pty[p-za-e][0-9a-f]*", NAME="pty/m%n", SYMLINK="%k"
74 KERNEL="tty[p-za-e][0-9a-f]*", NAME="tty/s%n", SYMLINK="%k"
75
76 # ramdisk devices
77 KERNEL="ram[0-9]*", NAME="rd/%n", SYMLINK="%k"
78
79 # sound devices
80 KERNEL="adsp",            NAME="sound/%k", SYMLINK="%k"
81 KERNEL="adsp[0-9]*",      NAME="sound/%k", SYMLINK="%k"
82 KERNEL="audio",           NAME="sound/%k", SYMLINK="%k"
83 KERNEL="audio[0-9]*",     NAME="sound/%k", SYMLINK="%k"
84 KERNEL="dsp",             NAME="sound/%k", SYMLINK="%k"
85 KERNEL="dsp[0-9]*",       NAME="sound/%k", SYMLINK="%k"
86 KERNEL="mixer",           NAME="sound/%k", SYMLINK="%k"
87 KERNEL="mixer[0-9]*",     NAME="sound/%k", SYMLINK="%k"
88 KERNEL="sequencer",       NAME="sound/%k", SYMLINK="%k"
89 KERNEL="sequencer[0-9]*", NAME="sound/%k", SYMLINK="%k"
90
91 # tty devices
92 KERNEL="tty[0-9]*",    NAME="vc/%n",  SYMLINK="%k"
93 KERNEL="ttyS[0-9]*",   NAME="tts/%n", SYMLINK="%k"
94 KERNEL="ttyUSB[0-9]*", NAME="tts/USB%n"
95
96 # vc devices
97 KERNEL="vcs",        NAME="vcc/0",   SYMLINK="%k"
98 KERNEL="vcs[0-9]*",  NAME="vcc/%n",  SYMLINK="%k"
99 KERNEL="vcsa",       NAME="vcc/a0",  SYMLINK="%k"
100 KERNEL="vcsa[0-9]*", NAME="vcc/a%n", SYMLINK="%k"
101
102 # v4l devices
103 KERNEL="video[0-9]*", NAME="v4l/video%n", SYMLINK="video%n"
104 KERNEL="radio[0-9]*", NAME="v4l/radio%n"
105 KERNEL="vbi[0-9]*",   NAME="v4l/vbi%n",   SYMLINK="vbi%n"
106 KERNEL="vtx[0-9]*",   NAME="v4l/vtx%n"
107
108 # USB devices
109 KERNEL="hiddev*",       NAME="usb/%k"
110 KERNEL="auer*",         NAME="usb/%k"
111 KERNEL="legousbtower*", NAME="usb/%k"
112 KERNEL="dabusb*",       NAME="usb/%k"
113 BUS="usb", KERNEL="lp[0-9]*",   NAME="usb/%k"
114
115 # netlink devices
116 KERNEL="route",         NAME="netlink/%k"
117 KERNEL="skip",          NAME="netlink/%k"
118 KERNEL="usersock",      NAME="netlink/%k"
119 KERNEL="fwmonitor",     NAME="netlink/%k"
120 KERNEL="tcpdiag",       NAME="netlink/%k"
121 KERNEL="nflog",         NAME="netlink/%k"
122 KERNEL="xfrm",          NAME="netlink/%k"
123 KERNEL="arpd",          NAME="netlink/%k"
124 KERNEL="route6",        NAME="netlink/%k"
125 KERNEL="ip6_fw",        NAME="netlink/%k"
126 KERNEL="dnrtmsg",       NAME="netlink/%k"
127 KERNEL="tap*",          NAME="netlink/%k"
128
129 # CAPI devices
130 KERNEL="capi",          NAME="capi20", SYMLINK="isdn/capi20"
131 KERNEL="capi*",         NAME="capi/%n"
132
133 # Network devices
134 KERNEL="tun",           NAME="net/%k"
135
136 # raw devices
137 KERNEL="raw[0-9]*",     NAME="raw/%k"
138
139 # cpu devices
140 KERNEL="cpu[0-9]*",     NAME="cpu/%n/cpuid"
141 KERNEL="msr[0-9]*",     NAME="cpu/%n/msr"
142 KERNEL="microcode",     NAME="cpu/microcode"