chiark / gitweb /
[PATCH] fix gentoo scsi cdrom rule
[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[0-9]*",  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 # capi devices
36 KERNEL="capi",          NAME="capi20", SYMLINK="isdn/capi20"
37 KERNEL="capi*",         NAME="capi/%n"
38
39 # cpu devices
40 KERNEL="cpu[0-9]*",     NAME="cpu/%n/cpuid"
41 KERNEL="msr[0-9]*",     NAME="cpu/%n/msr"
42 KERNEL="microcode",     NAME="cpu/microcode"
43
44 # dm devices (ignore them)
45 KERNEL="dm-[0-9]*",     NAME=""
46 # create a symlink named after the device map name
47 # note devmap_name comes with extras/multipath
48 #KERNEL="dm-[0-9]*",    PROGRAM="/sbin/devmap_name %M %m", NAME="%k", SYMLINK="%c"
49 KERNEL="device-mapper", NAME="mapper/control"
50
51 # fb devices
52 KERNEL="fb[0-9]*",      NAME="fb/%n", SYMLINK="%k"
53
54 # floppy devices
55 KERNEL="fd[0-9]*",      NAME="floppy/%n", SYMLINK="%k"
56
57 # i2c devices
58 KERNEL="i2c-[0-9]*",    NAME="i2c/%n", SYMLINK="%k"
59
60 # input devices
61 KERNEL="mice",          NAME="input/%k"
62 KERNEL="mouse*",        NAME="input/%k"
63 KERNEL="event*",        NAME="input/%k"
64 KERNEL="js*",           NAME="input/%k"
65 KERNEL="ts*",           NAME="input/%k"
66
67 # loop devices
68 KERNEL="loop[0-9]*",    NAME="loop/%n", SYMLINK="%k"
69
70 # md block devices
71 KERNEL="md[0-9]*",      NAME="md/%n", SYMLINK="%k"
72
73 # misc devices
74 KERNEL="agpgart",       NAME="misc/%k", SYMLINK="%k"
75 KERNEL="psaux",         NAME="misc/%k", SYMLINK="%k"
76 KERNEL="rtc",           NAME="misc/%k", SYMLINK="%k"
77 KERNEL="uinput",        NAME="misc/%k", SYMLINK="%k"
78 KERNEL="inotify",       NAME="misc/%k", SYMLINK="%k"
79
80 # netlink devices
81 KERNEL="route",         NAME="netlink/%k"
82 KERNEL="skip",          NAME="netlink/%k"
83 KERNEL="usersock",      NAME="netlink/%k"
84 KERNEL="fwmonitor",     NAME="netlink/%k"
85 KERNEL="tcpdiag",       NAME="netlink/%k"
86 KERNEL="nflog",         NAME="netlink/%k"
87 KERNEL="xfrm",          NAME="netlink/%k"
88 KERNEL="arpd",          NAME="netlink/%k"
89 KERNEL="route6",        NAME="netlink/%k"
90 KERNEL="ip6_fw",        NAME="netlink/%k"
91 KERNEL="dnrtmsg",       NAME="netlink/%k"
92 KERNEL="tap*",          NAME="netlink/%k"
93
94 # network devices
95 KERNEL="tun",           NAME="net/%k"
96
97 # pty devices
98 KERNEL="pty[p-za-e][0-9a-f]*", NAME="pty/m%n", SYMLINK="%k"
99 KERNEL="tty[p-za-e][0-9a-f]*", NAME="pty/s%n", SYMLINK="%k"
100
101 # ramdisk devices
102 KERNEL="ram[0-9]*",     NAME="rd/%n", SYMLINK="%k"
103
104 # raw devices
105 KERNEL="raw[0-9]*",     NAME="raw/%k"
106
107 # sound devices
108 KERNEL="adsp",            NAME="sound/%k", SYMLINK="%k"
109 KERNEL="adsp[0-9]*",      NAME="sound/%k", SYMLINK="%k"
110 KERNEL="audio",           NAME="sound/%k", SYMLINK="%k"
111 KERNEL="audio[0-9]*",     NAME="sound/%k", SYMLINK="%k"
112 KERNEL="dsp",             NAME="sound/%k", SYMLINK="%k"
113 KERNEL="dsp[0-9]*",       NAME="sound/%k", SYMLINK="%k"
114 KERNEL="mixer",           NAME="sound/%k", SYMLINK="%k"
115 KERNEL="mixer[0-9]*",     NAME="sound/%k", SYMLINK="%k"
116 KERNEL="sequencer",       NAME="sound/%k", SYMLINK="%k"
117 KERNEL="sequencer[0-9]*", NAME="sound/%k", SYMLINK="%k"
118
119 # tty devices
120 KERNEL="tty[0-9]*",     NAME="vc/%n",  SYMLINK="%k"
121 KERNEL="ttyS[0-9]*",    NAME="tts/%n", SYMLINK="%k"
122 KERNEL="ttyUSB[0-9]*",  NAME="tts/USB%n"
123
124 # usb devices
125 KERNEL="hiddev*",               NAME="usb/%k"
126 KERNEL="auer*",                 NAME="usb/%k"
127 KERNEL="legousbtower*",         NAME="usb/%k"
128 KERNEL="dabusb*",               NAME="usb/%k"
129 BUS="usb", KERNEL="lp[0-9]*",   NAME="usb/%k"
130
131 # vc devices
132 KERNEL="vcs",           NAME="vcc/0",   SYMLINK="%k"
133 KERNEL="vcs[0-9]*",     NAME="vcc/%n",  SYMLINK="%k"
134 KERNEL="vcsa",          NAME="vcc/a0",  SYMLINK="%k"
135 KERNEL="vcsa[0-9]*",    NAME="vcc/a%n", SYMLINK="%k"
136
137 # v4l devices
138 KERNEL="video[0-9]*",   NAME="v4l/video%n",     SYMLINK="video%n"
139 KERNEL="radio[0-9]*",   NAME="v4l/radio%n"
140 KERNEL="vbi[0-9]*",     NAME="v4l/vbi%n",       SYMLINK="vbi%n"
141 KERNEL="vtx[0-9]*",     NAME="v4l/vtx%n"
142