]> err.no Git - systemd/commitdiff
ignore rule with GOTO to a non-existent label
authorMarco d'Itri <md@Linux.IT>
Fri, 18 Jul 2008 14:22:26 +0000 (16:22 +0200)
committerKay Sievers <kay.sievers@vrfy.org>
Fri, 18 Jul 2008 14:22:26 +0000 (16:22 +0200)
udev_rules_parse.c

index 999af3b85e1ceaf3978656779f8168b8943936f1..3ada8b1c7d14c5bbc19d71857609ed1668e1771f 100644 (file)
@@ -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);