summaryrefslogtreecommitdiff
path: root/udev_rules_parse.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@suse.de>2005-07-07 22:32:48 +0200
committerKay Sievers <kay.sievers@suse.de>2005-07-07 22:32:48 +0200
commit613ffbeb15e0507581e5037850c1ea5d56cd0928 (patch)
treebe73472996b204997bda81689b9e6b15c9b8273f /udev_rules_parse.c
parentb2fe4b9ac96c254efa68d747bfb9843c438919a0 (diff)
fix default-name handling and NAME="" rules
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
Diffstat (limited to 'udev_rules_parse.c')
-rw-r--r--udev_rules_parse.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/udev_rules_parse.c b/udev_rules_parse.c
index 2add91fa9f..0021ec40be 100644
--- a/udev_rules_parse.c
+++ b/udev_rules_parse.c
@@ -365,7 +365,12 @@ static int add_to_rules(struct udev_rules *rules, char *line)
rule->ignore_remove = 1;
}
}
- add_rule_key(rule, &rule->name, operation, value);
+ 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);
continue;
}