summaryrefslogtreecommitdiff
path: root/udev
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2008-10-05 17:27:21 +0200
committerKay Sievers <kay.sievers@vrfy.org>2008-10-05 17:27:21 +0200
commitff6c1cb139336915dd0d0a3092bc65cecc2bc75f (patch)
treeef0cda33cc5393471632634823a0644be8008ff9 /udev
parent85e73aef06d79771cee9cefb56ce830c3c2d3344 (diff)
don not print error if GOTO jumps just to next rule
Diffstat (limited to 'udev')
-rw-r--r--udev/udev_rules_parse.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/udev/udev_rules_parse.c b/udev/udev_rules_parse.c
index 5a9552ffde..c42bd08c51 100644
--- a/udev/udev_rules_parse.c
+++ b/udev/udev_rules_parse.c
@@ -79,8 +79,8 @@ static size_t find_label(const struct udev_rules_iter *iter, const char *label)
next:
dbg(rules->udev, "current=%zi\n", current);
if (current >= rules->bufsize) {
- err(rules->udev, "LABEL='%s' not found, GOTO will be ignored\n", label);
- return iter->current;
+ dbg(rules->udev, "LABEL='%s' not found\n", label);
+ return 0;
}
rule = (struct udev_rule *) (rules->buf + current);
@@ -747,9 +747,10 @@ static int parse_file(struct udev_rules *rules, const char *filename)
dbg(rules->udev, "resolving goto label '%s'\n", goto_label);
rule->goto_rule_off = find_label(&iter, goto_label);
- if (rule->goto_rule_off == iter.current) {
- err(rules->udev, "goto nonexistent label '%s' in '%s'\n",
+ if (rule->goto_rule_off == 0) {
+ err(rules->udev, "ignore goto to nonexistent label '%s' in '%s'\n",
goto_label, filename);
+ rule->goto_rule_off = iter.current;
}
}
}