chiark / gitweb /
fix default-name handling and NAME="" rules
[elogind.git] / udev_rules_parse.c
index 2add91f..0021ec4 100644 (file)
@@ -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;
                }