]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Support OP_NOMATCH for TAG key 1428/head
authorFelipe Franciosi <felipe@paradoxo.org>
Wed, 30 Sep 2015 21:07:16 +0000 (22:07 +0100)
committerFelipe Franciosi <felipe@paradoxo.org>
Wed, 30 Sep 2015 21:07:16 +0000 (22:07 +0100)
The TAG key can be used in rules for event matching. At the moment, it
does not support inequality tests. This patch enhances the key test to
validate the rule if it does not contain a given TAG (by TAG!="value").

Signed-off-by: Felipe Franciosi <felipe@paradoxo.org>
src/udev/udev-rules.c

index d00f90afa640c6c16c3a724e60746f024e3f0b8b..31efde138d41c40985d4d12922c4b5616be36563 100644 (file)
@@ -1940,7 +1940,8 @@ int udev_rules_apply_to_event(struct udev_rules *rules,
                                         break;
                                 }
                         }
-                        if (!match && (cur->key.op != OP_NOMATCH))
+                        if ((!match && (cur->key.op != OP_NOMATCH)) ||
+                            (match && (cur->key.op == OP_NOMATCH)))
                                 goto nomatch;
                         break;
                 }