From f1db055ab2e349ce22254562faaece66d6a4a873 Mon Sep 17 00:00:00 2001 From: "christophe@saout.de" Date: Sat, 10 Jan 2004 00:55:28 -0800 Subject: [PATCH] add IGNORE rule type 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/. > > > > With udev a second device is created named /dev/dm- 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. --- etc/udev/udev.rules | 3 ++- etc/udev/udev.rules.devfs | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'etc') diff --git a/etc/udev/udev.rules b/etc/udev/udev.rules index b206503e15..c2b50eb90d 100644 --- a/etc/udev/udev.rules +++ b/etc/udev/udev.rules @@ -49,4 +49,5 @@ REPLACE, KERNEL="ttyUSB0", NAME="pl2303" # if this is a ide cdrom, name it the default name, and create a symlink to cdrom CALLOUT, BUS="ide", PROGRAM="/bin/cat /proc/ide/%k/media", ID="cdrom", NAME="%k", SYMLINK="cdrom" - +# device mapper creates its own device nodes +IGNORE, KERNEL="dm-[0-9]*" diff --git a/etc/udev/udev.rules.devfs b/etc/udev/udev.rules.devfs index 0d579a4dd4..537d655a0e 100644 --- a/etc/udev/udev.rules.devfs +++ b/etc/udev/udev.rules.devfs @@ -41,3 +41,6 @@ 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]*" -- cgit v1.2.3-54-g00ecf