]> err.no Git - systemd/commitdiff
print warning for NAME="%k" - it breaks the kernel supplied DEVNAME
authorKay Sievers <kay.sievers@vrfy.org>
Wed, 19 Aug 2009 05:31:39 +0000 (07:31 +0200)
committerKay Sievers <kay.sievers@vrfy.org>
Wed, 19 Aug 2009 05:31:39 +0000 (07:31 +0200)
udev/udev-rules.c

index 53baa187e6fed214112a85461d3e22b1b5119075..3ca209a89131552f9258844c74ebf6165258924f 100644 (file)
@@ -1406,6 +1406,9 @@ static int add_rule(struct udev_rules *rules, char *line,
                        } else {
                                if (value[0] == '\0')
                                        info(rules->udev, "name empty, node creation suppressed\n");
+                               else if (strcmp(value, "%k") == 0)
+                                       err(rules->udev, "NAME=\"%%k\" is superfluous and breaks "
+                                           "kernel supplied names, please remove it from %s:%u\n", filename, lineno);
                                rule_add_key(&rule_tmp, TK_A_NAME, op, value, NULL);
                                attr = get_key_attribute(rules->udev, key + sizeof("NAME")-1);
                                if (attr != NULL) {