]> git.ipfire.org Git - thirdparty/systemd.git/blame - udev.rules.devfs
[PATCH] add ability to have up to 5 SYSFS_ file/value pairs for the LABEL rule.
[thirdparty/systemd.git] / udev.rules.devfs
CommitLineData
ef3c3df3
GKH
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'
525d07e7 16# If this is not a partition, it will result in 'disc'
ef3c3df3
GKH
17#
18
babad3ff 19# ide block devices
ef3c3df3
GKH
20NUMBER, BUS="ide", id="0.0", NAME="ide/host0/bus0/target0/lun0/%D"
21NUMBER, BUS="ide", id="0.1", NAME="ide/host0/bus0/target1/lun0/%D"
22NUMBER, BUS="ide", id="1.0", NAME="ide/host0/bus1/target0/lun0/%D"
23NUMBER, BUS="ide", id="1.1", NAME="ide/host0/bus1/target1/lun0/%D"
24
babad3ff 25# md block devices
ef3c3df3
GKH
26REPLACE, KERNEL="md[0-9]*", NAME="md/%n"
27
babad3ff 28# tty devices
ef3c3df3
GKH
29REPLACE, KERNEL="tty[0-9]*", NAME="vc/%n"
30REPLACE, KERNEL="ttyS[0-9]*", NAME="tts/%n"
31REPLACE, KERNEL="ttyUSB[0-9]*", NAME="tts/USB%n"
32
babad3ff
GKH
33# vc devices
34REPLACE, KERNEL="vcs", NAME="vcc/0"
35REPLACE, KERNEL="vcs[0-9]*", NAME="vcc/%n"
36REPLACE, KERNEL="vcsa", NAME="vcc/a0"
37REPLACE, KERNEL="vcsa[0-9]*", NAME="vcc/a%n"
38
39# v4l devices
ef3c3df3
GKH
40REPLACE, KERNEL="video[0-9]*", NAME="v4l/video%n"
41REPLACE, KERNEL="radio[0-9]*", NAME="v4l/radio%n"
42REPLACE, KERNEL="vbi[0-9]*", NAME="v4l/vbi%n"
43REPLACE, KERNEL="vtx[0-9]*", NAME="v4l/vtx%n"