summaryrefslogtreecommitdiff
path: root/namedev_parse.c
diff options
context:
space:
mode:
authorchristophe@saout.de <christophe@saout.de>2004-01-10 00:55:28 -0800
committerGreg KH <gregkh@suse.de>2005-04-26 21:13:14 -0700
commitf1db055ab2e349ce22254562faaece66d6a4a873 (patch)
tree4413147132819486b06f92cfec717dfb4a6d5659 /namedev_parse.c
parentc53735efc9720b28676c1b51fbed04dc592236e8 (diff)
[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/<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.
Diffstat (limited to 'namedev_parse.c')
-rw-r--r--namedev_parse.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/namedev_parse.c b/namedev_parse.c
index 4b1377dc32..5b5a5b3bc1 100644
--- a/namedev_parse.c
+++ b/namedev_parse.c
@@ -110,6 +110,10 @@ void dump_config_dev(struct config_device *dev)
dbg_parse("CALLOUT name='%s', bus='%s', program='%s', id='%s'",
dev->name, dev->bus, dev->exec_program, dev->id);
break;
+ case IGNORE:
+ dbg_parse("IGNORE name='%s', kernel_name='%s'",
+ dev->name, dev->kernel_name);
+ break;
default:
dbg_parse("unknown type of method");
}
@@ -209,6 +213,11 @@ int namedev_init_rules(void)
goto keys;
}
+ if (strcasecmp(temp2, TYPE_IGNORE) == 0) {
+ dev.type = IGNORE;
+ goto keys;
+ }
+
dbg_parse("unknown type of method '%s'", temp2);
goto error;
keys:
@@ -323,6 +332,12 @@ keys:
(*dev.exec_program == '\0'))
goto error;
break;
+ case IGNORE:
+ dbg_parse(TYPE_IGNORE "name='%s', kernel_name='%s'",
+ dev.name, dev.kernel_name);
+ if ((*dev.kernel_name == '\0'))
+ goto error;
+ break;
default:
dbg_parse("unknown type of method");
goto error;