summaryrefslogtreecommitdiff
path: root/udev_rules_parse.c
diff options
context:
space:
mode:
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;
}