summaryrefslogtreecommitdiff
path: root/udev/udev-rules.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2010-05-05 11:14:50 +0200
committerKay Sievers <kay.sievers@vrfy.org>2010-05-05 11:39:25 +0200
commit75cb1ac51ea0176926c749bd0f22c19ce8b20e5f (patch)
tree7d813ccdbe7385c4b69b0a3507ffae6f3f7a7bb2 /udev/udev-rules.c
parent2d01980f1afbde8aabd175a5d866a8eeccc29208 (diff)
warn when renaming kernel-provided nodes instead of adding symlinks
Diffstat (limited to 'udev/udev-rules.c')
-rw-r--r--udev/udev-rules.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/udev/udev-rules.c b/udev/udev-rules.c
index eb73221fa9..59fdb71853 100644
--- a/udev/udev-rules.c
+++ b/udev/udev-rules.c
@@ -1468,9 +1468,13 @@ static int add_rule(struct udev_rules *rules, char *line,
if (op < OP_MATCH_MAX) {
rule_add_key(&rule_tmp, TK_M_NAME, op, value, NULL);
} 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);
+ if (strcmp(value, "%k") == 0) {
+ err(rules->udev, "NAME=\"%%k\" is ignored because it breaks kernel supplied names, "
+ "please remove it from %s:%u\n", filename, lineno);
+ continue;
+ }
+ if (value[0] == '\0')
+ continue;
rule_add_key(&rule_tmp, TK_A_NAME, op, value, NULL);
}
rule_tmp.rule.rule.flags = 1;