chiark / gitweb /
[PATCH] Add infiniband to gentoo rules.
[elogind.git] / etc / udev / gentoo / udev.rules
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 # all block devices
16 SUBSYSTEM="block", GROUP="disk"
17
18 # cdrom symlinks and other good cdrom naming
19 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}"
20 BUS="scsi", KERNEL="sr[0-9]*", PROGRAM="/etc/udev/scripts/cdsymlinks.sh %k", SYMLINK="%c{1} %c{2} %c{3} %c{4} %c{5} %c{6}"
21 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}"
22
23 # devfs-names for ide-devices (uncomment only one)
24 #  /dev/ide/.../{disc,cd} and /dev/{cdroms,discs}/* type names
25 BUS="ide", KERNEL="hd*", PROGRAM="/etc/udev/scripts/ide-devfs.sh %k %b %n", NAME="%k", SYMLINK="%c{1} %c{2}", GROUP="%c{3}"
26
27 # disk devices
28 KERNEL="sd*",           NAME="%k", GROUP="disk"
29 KERNEL="dasd*",         NAME="%k", GROUP="disk"
30 KERNEL="ataraid*",      NAME="%k", GROUP="disk"
31
32 # dri devices
33 KERNEL="card*",         NAME="dri/card%n", GROUP="video"
34 KERNEL="nvidia*",       NAME="%k", GROUP="video"
35 KERNEL="3dfx*",         NAME="%k", GROUP="video"
36
37 # alsa devices
38 SUBSYSTEM="sound", GROUP="audio"
39 KERNEL="controlC[0-9]*",        NAME="snd/%k"
40 KERNEL="hw[CD0-9]*",            NAME="snd/%k"
41 KERNEL="pcm[CD0-9cp]*",         NAME="snd/%k"
42 KERNEL="midiC[D0-9]*",          NAME="snd/%k"
43 KERNEL="timer",                 NAME="snd/%k"
44 KERNEL="seq",                   NAME="snd/%k"
45
46 # capi devices
47 KERNEL="capi",          NAME="capi20", SYMLINK="isdn/capi20"
48 KERNEL="capi*",         NAME="capi/%n"
49
50 # cpu devices
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 # dm devices (ignore them)
56 KERNEL="dm-[0-9]*",     NAME=""
57 # create a symlink named after the device map name
58 # note devmap_name comes with extras/multipath
59 #KERNEL="dm-[0-9]*",    PROGRAM="/sbin/devmap_name %M %m", NAME="%k", SYMLINK="%c"
60 KERNEL="device-mapper", NAME="mapper/control"
61
62 # fb devices
63 KERNEL="fb[0-9]*",      NAME="fb/%n", SYMLINK="%k", GROUP="video", MODE="0600"
64
65 # floppy devices
66 KERNEL="fd[0-9]*",      NAME="floppy/%n", SYMLINK="%k", GROUP="floppy"
67
68 # i2c devices
69 KERNEL="i2c-[0-9]*",    NAME="i2c/%n", SYMLINK="%k"
70
71 # input devices
72 KERNEL="mice",          NAME="input/%k", MODE="0644"
73 KERNEL="mouse*",        NAME="input/%k", MODE="0644"
74 KERNEL="event*",        NAME="input/%k", MODE="0600"
75 KERNEL="js*",           NAME="input/%k", MODE="664"
76 KERNEL="ts*",           NAME="input/%k", MODE="0600"
77
78 # loop devices
79 KERNEL="loop[0-9]*",    NAME="loop/%n", SYMLINK="%k", GROUP="disk"
80
81 # md block devices
82 KERNEL="md[0-9]*",      NAME="md/%n", SYMLINK="%k", GROUP="disk"
83
84 # aoe char devices,
85 SUBSYSTEM="aoe", KERNEL="discover",     NAME="etherd/%k", GROUP="disk", MODE="0220"
86 SUBSYSTEM="aoe", KERNEL="err",          NAME="etherd/%k", GROUP="disk", MODE="0440"
87 SUBSYSTEM="aoe", KERNEL="interfaces",   NAME="etherd/%k", GROUP="disk", MODE="0220"
88
89 # misc devices
90 KERNEL="agpgart",       NAME="misc/%k", SYMLINK="%k"
91 KERNEL="psaux",         NAME="misc/%k", SYMLINK="%k"
92 KERNEL="rtc",           NAME="misc/%k", SYMLINK="%k", MODE="0664"
93 KERNEL="uinput",        NAME="misc/%k", SYMLINK="%k"
94 KERNEL="inotify",       NAME="misc/%k", SYMLINK="%k", MODE="0666"
95
96 # netlink devices
97 KERNEL="route",         NAME="netlink/%k"
98 KERNEL="skip",          NAME="netlink/%k"
99 KERNEL="usersock",      NAME="netlink/%k"
100 KERNEL="fwmonitor",     NAME="netlink/%k"
101 KERNEL="tcpdiag",       NAME="netlink/%k"
102 KERNEL="nflog",         NAME="netlink/%k"
103 KERNEL="xfrm",          NAME="netlink/%k"
104 KERNEL="arpd",          NAME="netlink/%k"
105 KERNEL="route6",        NAME="netlink/%k"
106 KERNEL="ip6_fw",        NAME="netlink/%k"
107 KERNEL="dnrtmsg",       NAME="netlink/%k"
108 KERNEL="tap*",          NAME="netlink/%k"
109
110 # network devices
111 KERNEL="tun",           NAME="net/%k"
112
113 # ramdisk devices
114 KERNEL="ram[0-9]*",     NAME="rd/%n", SYMLINK="%k"
115
116 # raw devices
117 KERNEL="raw[0-9]*",     NAME="raw/%k", GROUP="disk"
118 KERNEL="ram*",          NAME="%k", GROUP="disk"
119
120 # sound devices
121 KERNEL="adsp",                  NAME="sound/%k", SYMLINK="%k", GROUP="audio"
122 KERNEL="adsp[0-9]*",            NAME="sound/%k", SYMLINK="%k", GROUP="audio"
123 KERNEL="audio",                 NAME="sound/%k", SYMLINK="%k", GROUP="audio"
124 KERNEL="audio[0-9]*",           NAME="sound/%k", SYMLINK="%k", GROUP="audio"
125 KERNEL="dsp",                   NAME="sound/%k", SYMLINK="%k", GROUP="audio"
126 KERNEL="dsp[0-9]*",             NAME="sound/%k", SYMLINK="%k", GROUP="audio"
127 KERNEL="mixer",                 NAME="sound/%k", SYMLINK="%k", GROUP="audio"
128 KERNEL="mixer[0-9]*",           NAME="sound/%k", SYMLINK="%k", GROUP="audio"
129 KERNEL="sequencer",             NAME="sound/%k", SYMLINK="%k", GROUP="audio"
130 KERNEL="sequencer[0-9]*",       NAME="sound/%k", SYMLINK="%k", GROUP="audio"
131
132 # tty devices
133 KERNEL="console",       NAME="%k", GROUP="tty", MODE="0600"
134 KERNEL="tty",           NAME="%k", GROUP="tty", MODE="0666"
135 KERNEL="tty[0-9]*",     NAME="vc/%n",  SYMLINK="%k", GROUP="tty"
136 KERNEL="ttyS[0-9]*",    NAME="tts/%n", SYMLINK="%k", GROUP="tty"
137 KERNEL="ttyUSB[0-9]*",  NAME="tts/USB%n", GROUP="tty", MODE="0600"
138 KERNEL="ippp0",         NAME="%k", GROUP="tty"
139 KERNEL="isdn*",         NAME="%k", GROUP="tty"
140 KERNEL="dcbri*",        NAME="%k", GROUP="tty"
141 KERNEL="ircomm*",       NAME="%k", GROUP="tty"
142
143 # pty devices
144 KERNEL="ptmx",                  NAME="%k", GROUP="tty", MODE="0666"
145 KERNEL="pty[p-za-e][0-9a-f]*",  NAME="pty/m%n", SYMLINK="%k", GROUP="tty"
146 KERNEL="tty[p-za-e][0-9a-f]*",  NAME="pty/s%n", SYMLINK="%k", GROUP="tty"
147
148 # vc devices
149 KERNEL="vcs",           NAME="vcc/0",   SYMLINK="%k", GROUP="tty"
150 KERNEL="vcs[0-9]*",     NAME="vcc/%n",  SYMLINK="%k", GROUP="tty"
151 KERNEL="vcsa",          NAME="vcc/a0",  SYMLINK="%k", GROUP="tty"
152 KERNEL="vcsa[0-9]*",    NAME="vcc/a%n", SYMLINK="%k", GROUP="tty"
153
154 # memory devices
155 KERNEL="random",        NAME="%k", MODE="0666"
156 KERNEL="urandom",       NAME="%k", MODE="0444"
157 KERNEL="mem",           NAME="%k", MODE="0640"
158 KERNEL="kmem",          NAME="%k", MODE="0640"
159 KERNEL="port",          NAME="%k", MODE="0640"
160 KERNEL="full",          NAME="%k", MODE="0666"
161 KERNEL="null",          NAME="%k", MODE="0666"
162 KERNEL="zero",          NAME="%k", MODE="0666"
163
164 # usb devices
165 KERNEL="hiddev*",               NAME="usb/%k"
166 KERNEL="auer*",                 NAME="usb/%k"
167 KERNEL="legousbtower*",         NAME="usb/%k", GROUP="usb"
168 KERNEL="dabusb*",               NAME="usb/%k"
169 BUS="usb", KERNEL="lp[0-9]*",   NAME="usb/%k", GROUP="lp"
170
171 # v4l devices
172 KERNEL="video[0-9]*",   NAME="v4l/video%n", SYMLINK="video%n", GROUP="video"
173 KERNEL="radio[0-9]*",   NAME="v4l/radio%n", GROUP="video"
174 KERNEL="vbi[0-9]*",     NAME="v4l/vbi%n", SYMLINK="vbi%n", GROUP="video"
175 KERNEL="vtx[0-9]*",     NAME="v4l/vtx%n", GROUP="video"
176
177 # dvb devices
178 KERNEL="dvb*", PROGRAM="/etc/udev/scripts/dvb.sh %k", NAME="%c", GROUP="video", MODE="0660"
179
180 # Asterix Zaptel devices
181 KERNEL="zapctl",        NAME="zap/ctl"
182 KERNEL="zaptimer",      NAME="zap/timer"
183 KERNEL="zapchannel",    NAME="zap/channel"
184 KERNEL="zappseudo",     NAME="zap/pseudo"
185 KERNEL="zap[0-9]*",     NAME="zap/%n"
186
187 # pilot/palm devices
188 KERNEL="pilot",         NAME="%k", GROUP="uucp"
189
190 # jaz devices
191 KERNEL="jaz*",          NAME="%k", GROUP="disk"
192
193 # zip devices
194 KERNEL="pocketzip*",    NAME="%k", GROUP="disk"
195 KERNEL="zip*",          NAME="%k", GROUP="disk"
196
197 # ls120 devices
198 KERNEL="ls120",         NAME="%k", GROUP="disk"
199
200 # lp devices
201 KERNEL="lp*",           NAME="%k", GROUP="lp"
202 KERNEL="irlpt",         NAME="%k", GROUP="lp"
203 KERNEL="usblp",         NAME="%k", GROUP="lp"
204 KERNEL="lp*",           NAME="%k", GROUP="lp"
205
206 # tape devices
207 KERNEL="ht*",           NAME="%k", GROUP="tape"
208 KERNEL="nht*",          NAME="%k", GROUP="tape"
209 KERNEL="pt*",           NAME="%k", GROUP="tape"
210 KERNEL="npt*",          NAME="%k", GROUP="tape"
211 KERNEL="st*",           NAME="%k", GROUP="tape"
212 KERNEL="nst*",          NAME="%k", GROUP="tape"
213 KERNEL="osst*",         NAME="%k", GROUP="tape"
214 KERNEL="nosst*",        NAME="%k", GROUP="tape"
215
216 # diskonkey devices
217 KERNEL="diskonkey*",    NAME="%k", GROUP="disk"
218
219 # rem_ide devices
220 KERNEL="microdrive*",   NAME="%k", GROUP="disk"
221
222 # kbd devices
223 KERNEL="kbd",           NAME="%k", MODE="0664"
224
225 # Sony Vaio Jogdial sonypi device
226 KERNEL="sonypi",        NAME="%k", MODE="0666"
227
228 # packet devices
229 KERNEL="pktcdvd",       NAME="pktcdvd/control", GROUP="cdrw", MODE="0660"
230 KERNEL="pktcdvd[0-9]*", NAME="pktcdvd/pktcdvd%n", GROUP="cdrw", MODE="0660"
231
232 # infiniband devices
233 KERNEL="umad*", NAME="infiniband/%k"
234 KERNEL="issm*", NAME="infiniband/%k"