chiark / gitweb /
[PATCH] make symlink work properly if there is already a file in its place
[elogind.git] / udev.rules.devfs
1 # These rules are to try to emulate a devfs naming scheme in udev
2 # if there are any missing rules, please let the udev developers
3 # know.
4 #
5 # There are a number of modifiers that are allowed to be used in the
6 # a number of the different fields. They provide the following subsitutions:
7 # %n - the "kernel number" of the device.
8 #      for example, 'sda3' has a "kernel number" of '3'
9 # %M - the kernel major number for the device
10 # %m - the kernel minor number for the device
11 # %b - the bus id for the device
12 # %c - the return value for the CALLOUT program (note, this doesn't work within
13 #      the PROGRAM field for the obvious reason.)
14 # %D - use the devfs style disk name for this device.
15 #      For partitions, this will result in 'part%n'
16 #      If this is not a partition, it will result in 'disc'
17 #
18
19 # ide block devices
20 NUMBER, BUS="ide", id="0.0", NAME="ide/host0/bus0/target0/lun0/%D"
21 NUMBER, BUS="ide", id="0.1", NAME="ide/host0/bus0/target1/lun0/%D"
22 NUMBER, BUS="ide", id="1.0", NAME="ide/host0/bus1/target0/lun0/%D"
23 NUMBER, BUS="ide", id="1.1", NAME="ide/host0/bus1/target1/lun0/%D"
24
25 # md block devices
26 REPLACE, KERNEL="md[0-9]*", NAME="md/%n"
27
28 # tty devices
29 REPLACE, KERNEL="tty[0-9]*", NAME="vc/%n"
30 REPLACE, KERNEL="ttyS[0-9]*", NAME="tts/%n"
31 REPLACE, KERNEL="ttyUSB[0-9]*", NAME="tts/USB%n"
32
33 # vc devices
34 REPLACE, KERNEL="vcs",        NAME="vcc/0"
35 REPLACE, KERNEL="vcs[0-9]*",  NAME="vcc/%n"
36 REPLACE, KERNEL="vcsa",       NAME="vcc/a0"
37 REPLACE, KERNEL="vcsa[0-9]*", NAME="vcc/a%n"
38
39 # v4l devices
40 REPLACE, KERNEL="video[0-9]*", NAME="v4l/video%n"
41 REPLACE, KERNEL="radio[0-9]*", NAME="v4l/radio%n"
42 REPLACE, KERNEL="vbi[0-9]*",   NAME="v4l/vbi%n"
43 REPLACE, KERNEL="vtx[0-9]*",   NAME="v4l/vtx%n"