chiark / gitweb /
[PATCH] add OPTION="last_rule" to skip any later rule
[elogind.git] / udev_rules_parse.c
index 4f431de..f77f3db 100644 (file)
@@ -283,6 +283,10 @@ static int rules_parse(struct udevice *udev, const char *filename)
                        }
 
                        if (strcasecmp(temp2, FIELD_OPTIONS) == 0) {
+                               if (strstr(temp3, OPTION_LAST_RULE) != NULL) {
+                                       dbg("last rule to be applied");
+                                       rule.last_rule = 1;
+                               }
                                if (strstr(temp3, OPTION_IGNORE_DEVICE) != NULL) {
                                        dbg("device should be ignored");
                                        rule.ignore_device = 1;