summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2009-08-19 07:31:39 +0200
committerKay Sievers <kay.sievers@vrfy.org>2009-08-19 07:31:39 +0200
commit8e2470d68ef093d39907cc67dcee377b36ba77be (patch)
tree5cd3639bbd6997b6512d493132232a6b14368593
parent8eefdffb6bb458403c4fa5c9435290189d8d2a60 (diff)
print warning for NAME="%k" - it breaks the kernel supplied DEVNAME
-rw-r--r--udev/udev-rules.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/udev/udev-rules.c b/udev/udev-rules.c
index 53baa187e6..3ca209a891 100644
--- a/udev/udev-rules.c
+++ b/udev/udev-rules.c
@@ -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) {