mirror of
https://github.com/AuxXxilium/eudev.git
synced 2024-12-15 02:56:51 +07:00
let NAME="" supress node creation, but do RUN keys
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
This commit is contained in:
parent
fc465079ca
commit
271c2d7d26
@ -73,13 +73,12 @@ int udev_process_event(struct udev_rules *rules, struct udevice *udev)
|
||||
sysfs_close_class_device(class_dev);
|
||||
return -1;
|
||||
}
|
||||
if (udev->name[0] == '\0') {
|
||||
if (udev->name[0] != '\0') {
|
||||
/* create node, store in db */
|
||||
retval = udev_add_device(udev, class_dev);
|
||||
} else {
|
||||
info("device node creation supressed");
|
||||
sysfs_close_class_device(class_dev);
|
||||
return -1;
|
||||
}
|
||||
/* create node, store in db */
|
||||
retval = udev_add_device(udev, class_dev);
|
||||
} else {
|
||||
dbg("no dev-file found");
|
||||
udev_rules_get_run(rules, udev, class_dev, NULL);
|
||||
|
@ -413,12 +413,9 @@ static int add_to_rules(struct udev_rules *rules, char *line)
|
||||
rule->ignore_remove = 1;
|
||||
}
|
||||
}
|
||||
if (value[0] == '\0') {
|
||||
dbg("name empty device should be ignored");
|
||||
rule->name.operation = operation;
|
||||
rule->ignore_device = 1;
|
||||
} else
|
||||
add_rule_key(rule, &rule->name, operation, value);
|
||||
if (value[0] == '\0')
|
||||
dbg("name empty, not creation supressed");
|
||||
add_rule_key(rule, &rule->name, operation, value);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user