mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-11-01 00:51:08 +03:00
f1db055ab2
On Wed, Dec 31, 2003 at 11:24:53AM -0800, Greg KH wrote: > > There should be a possibility to tell udev not to create a device node. > > > > device-mapper: Usually set up by libdevmapper (or EVMS tools) which > > creates the device node on its own under /dev/mapper/<name>. > > > > With udev a second device is created named /dev/dm-<minor> which is not > > really needed. > > Good point. Ok, I'll agree with you. Care to make up a patch for this > kind of feature? Yes, I can try. There was no way to tell not to do anything so I created one. Errors are signalled via negative return values, so I thought that a positive, non-zero one could mean to ignore the device. I don't like it but perhaps you have a better solution.
47 lines
1.7 KiB
Plaintext
47 lines
1.7 KiB
Plaintext
# These rules are to try to emulate a devfs naming scheme in udev
|
|
# if there are any missing rules, please let the udev developers
|
|
# know.
|
|
#
|
|
# There are a number of modifiers that are allowed to be used in the
|
|
# a number of the different fields. They provide the following subsitutions:
|
|
# %n - the "kernel number" of the device.
|
|
# for example, 'sda3' has a "kernel number" of '3'
|
|
# %M - the kernel major number for the device
|
|
# %m - the kernel minor number for the device
|
|
# %b - the bus id for the device
|
|
# %c - the return value for the CALLOUT program (note, this doesn't work within
|
|
# the PROGRAM field for the obvious reason.)
|
|
# %D - use the devfs style disk name for this device.
|
|
# For partitions, this will result in 'part%n'
|
|
# If this is not a partition, it will result in 'disc'
|
|
#
|
|
|
|
# ide block devices
|
|
NUMBER, BUS="ide", id="0.0", NAME="ide/host0/bus0/target0/lun0/%D"
|
|
NUMBER, BUS="ide", id="0.1", NAME="ide/host0/bus0/target1/lun0/%D"
|
|
NUMBER, BUS="ide", id="1.0", NAME="ide/host0/bus1/target0/lun0/%D"
|
|
NUMBER, BUS="ide", id="1.1", NAME="ide/host0/bus1/target1/lun0/%D"
|
|
|
|
# md block devices
|
|
REPLACE, KERNEL="md[0-9]*", NAME="md/%n"
|
|
|
|
# tty devices
|
|
REPLACE, KERNEL="tty[0-9]*", NAME="vc/%n"
|
|
REPLACE, KERNEL="ttyS[0-9]*", NAME="tts/%n"
|
|
REPLACE, KERNEL="ttyUSB[0-9]*", NAME="tts/USB%n"
|
|
|
|
# vc devices
|
|
REPLACE, KERNEL="vcs", NAME="vcc/0"
|
|
REPLACE, KERNEL="vcs[0-9]*", NAME="vcc/%n"
|
|
REPLACE, KERNEL="vcsa", NAME="vcc/a0"
|
|
REPLACE, KERNEL="vcsa[0-9]*", NAME="vcc/a%n"
|
|
|
|
# v4l devices
|
|
REPLACE, KERNEL="video[0-9]*", NAME="v4l/video%n"
|
|
REPLACE, KERNEL="radio[0-9]*", NAME="v4l/radio%n"
|
|
REPLACE, KERNEL="vbi[0-9]*", NAME="v4l/vbi%n"
|
|
REPLACE, KERNEL="vtx[0-9]*", NAME="v4l/vtx%n"
|
|
|
|
# dm devices
|
|
IGNORE, KERNEL="dm-[0-9]*"
|