summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco d'Itri <md@Linux.IT>2008-07-18 16:22:26 +0200
committerKay Sievers <kay.sievers@vrfy.org>2008-07-18 16:22:26 +0200
commit655a8acf920cd43356003b4499e545a7b2fcc402 (patch)
treed88e6ec5ec800649dbe80970aced0ce556261097
parent282988c4f8a85c28468e6442e86efe51dc71cc93 (diff)
ignore rule with GOTO to a non-existent label
-rw-r--r--udev_rules_parse.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/udev_rules_parse.c b/udev_rules_parse.c
index 999af3b85e..3ada8b1c7d 100644
--- a/udev_rules_parse.c
+++ b/udev_rules_parse.c
@@ -60,11 +60,13 @@ struct udev_rule *udev_rules_iter_next(struct udev_rules *rules)
struct udev_rule *udev_rules_iter_label(struct udev_rules *rules, const char *label)
{
static struct udev_rule *rule;
+ size_t start = rules->current;
next:
dbg("current=%zi\n", rules->current);
if (rules->current >= rules->bufsize) {
- dbg("no more rules\n");
+ err("LABEL='%s' not found, GOTO will be ignored\n", label);
+ rules->current = start;
return NULL;
}
rule = (struct udev_rule *) (rules->buf + rules->current);