chiark / gitweb /
f8208d9495a8d33418013876164814b517b34818
[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 # devfs-names for ide-devices (uncomment only one)
16 #  /dev/ide/.../{disc,cd} and /dev/{cdroms,discs}/* type names
17 BUS="ide", KERNEL="hd*", PROGRAM="/etc/udev/scripts/ide-devfs.sh %k %b %n", NAME="%k", SYMLINK="%c{1} %c{2}"
18
19 # DRI devices
20 KERNEL="card*", NAME="dri/card%n"
21
22 # alsa devices
23 KERNEL="controlC[0-9]*", NAME="snd/%k"
24 KERNEL="hw[CD0-9]*",     NAME="snd/%k"
25 KERNEL="pcm[CD0-9cp]*",  NAME="snd/%k"
26 KERNEL="midiC[D0-9]*",   NAME="snd/%k"
27 KERNEL="timer",          NAME="snd/%k"
28 KERNEL="seq",            NAME="snd/%k"
29
30 # dm devices (ignore them)
31 KERNEL="dm-[0-9]*",     NAME=""
32 # create a symlink named after the device map name
33 # note devmap_name comes with extras/multipath
34 #KERNEL="dm-[0-9]*",     PROGRAM="/sbin/devmap_name %M %m", NAME="%k", SYMLINK="%c"
35 KERNEL="device-mapper", NAME="mapper/control"
36
37 # fb devices
38 KERNEL="fb[0-9]*", NAME="fb/%n", SYMLINK="%k"
39
40 # floppy devices
41 KERNEL="fd[0-9]*", NAME="floppy/%n", SYMLINK="%k"
42
43 # i2c devices
44 KERNEL="i2c-[0-9]*", NAME="i2c/%n", SYMLINK="%k"
45
46 # input devices
47 KERNEL="mice",          NAME="input/%k"
48 KERNEL="mouse*",        NAME="input/%k"
49 KERNEL="event*",        NAME="input/%k"
50 KERNEL="js*",           NAME="input/%k"
51 KERNEL="ts*",           NAME="input/%k"
52
53 # loop devices
54 KERNEL="loop[0-9]*", NAME="loop/%n", SYMLINK="%k"
55
56 # md block devices
57 KERNEL="md[0-9]*", NAME="md/%n", SYMLINK="%k"
58
59 # misc devices
60 KERNEL="agpgart",   NAME="misc/%k", SYMLINK="%k"
61 KERNEL="microcode", NAME="misc/%k", SYMLINK="%k"
62 KERNEL="psaux",     NAME="misc/%k", SYMLINK="%k"
63 KERNEL="rtc",       NAME="misc/%k", SYMLINK="%k"
64 KERNEL="uinput",    NAME="misc/%k", SYMLINK="%k"
65
66 # pty devices
67 KERNEL="pty[p-za-e][0-9a-f]*", NAME="pty/m%n", SYMLINK="%k"
68 KERNEL="tty[p-za-e][0-9a-f]*", NAME="pty/s%n", SYMLINK="%k"
69
70 # ramdisk devices
71 KERNEL="ram[0-9]*", NAME="rd/%n", SYMLINK="%k"
72
73 # sound devices
74 KERNEL="adsp",            NAME="sound/%k", SYMLINK="%k"
75 KERNEL="adsp[0-9]*",      NAME="sound/%k", SYMLINK="%k"
76 KERNEL="audio",           NAME="sound/%k", SYMLINK="%k"
77 KERNEL="audio[0-9]*",     NAME="sound/%k", SYMLINK="%k"
78 KERNEL="dsp",             NAME="sound/%k", SYMLINK="%k"
79 KERNEL="dsp[0-9]*",       NAME="sound/%k", SYMLINK="%k"
80 KERNEL="mixer",           NAME="sound/%k", SYMLINK="%k"
81 KERNEL="mixer[0-9]*",     NAME="sound/%k", SYMLINK="%k"
82 KERNEL="sequencer",       NAME="sound/%k", SYMLINK="%k"
83 KERNEL="sequencer[0-9]*", NAME="sound/%k", SYMLINK="%k"
84
85 # tty devices
86 KERNEL="tty[0-9]*",    NAME="vc/%n",  SYMLINK="%k"
87 KERNEL="ttyS[0-9]*",   NAME="tts/%n", SYMLINK="%k"
88 KERNEL="ttyUSB[0-9]*", NAME="tts/USB%n"
89
90 # vc devices
91 KERNEL="vcs",        NAME="vcc/0",   SYMLINK="%k"
92 KERNEL="vcs[0-9]*",  NAME="vcc/%n",  SYMLINK="%k"
93 KERNEL="vcsa",       NAME="vcc/a0",  SYMLINK="%k"
94 KERNEL="vcsa[0-9]*", NAME="vcc/a%n", SYMLINK="%k"
95
96 # v4l devices
97 KERNEL="video[0-9]*", NAME="v4l/video%n"
98 KERNEL="radio[0-9]*", NAME="v4l/radio%n"
99 KERNEL="vbi[0-9]*",   NAME="v4l/vbi%n"
100 KERNEL="vtx[0-9]*",   NAME="v4l/vtx%n"
101
102 # USB devices
103 KERNEL="hiddev*",       NAME="usb/%k"
104 KERNEL="auer*",         NAME="usb/%k"
105 KERNEL="legousbtower*", NAME="usb/%k"
106 KERNEL="dabusb*",       NAME="usb/%k"
107 BUS="usb", KERNEL="lp[0-9]*",   NAME="usb/%k"
108
109 # netlink devices
110 KERNEL="route",         NAME="netlink/%k"
111 KERNEL="skip",          NAME="netlink/%k"
112 KERNEL="usersock",      NAME="netlink/%k"
113 KERNEL="fwmonitor",     NAME="netlink/%k"
114 KERNEL="tcpdiag",       NAME="netlink/%k"
115 KERNEL="nflog",         NAME="netlink/%k"
116 KERNEL="xfrm",          NAME="netlink/%k"
117 KERNEL="arpd",          NAME="netlink/%k"
118 KERNEL="route6",        NAME="netlink/%k"
119 KERNEL="ip6_fw",        NAME="netlink/%k"
120 KERNEL="dnrtmsg",       NAME="netlink/%k"
121 KERNEL="tap*",          NAME="netlink/%k"
122
123 # CAPI devices
124 KERNEL="capi",          NAME="capi20", SYMLINK="isdn/capi20"
125 KERNEL="capi*",         NAME="capi/%n"
126
127 # Network devices
128 KERNEL="tun",           NAME="net/%k"
129
130 # raw devices
131 KERNEL="raw[0-9]*",     NAME="raw/%k"
132
133 # cpu devices
134 KERNEL="cpu[0-9]*",     NAME="cpu/%n/cpuid"
135 KERNEL="msr[0-9]*",     NAME="cpu/%n/cpuid"
136 KERNEL="microcode",     NAME="cpu/microcode"