From: Felipe Franciosi Date: Wed, 30 Sep 2015 21:07:16 +0000 (+0100) Subject: Support OP_NOMATCH for TAG key X-Git-Tag: v227~38^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4302857b31a8e89ddeba0921fee06a1ff0237996;p=thirdparty%2Fsystemd.git Support OP_NOMATCH for TAG key 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 --- diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c index d00f90afa64..31efde138d4 100644 --- a/src/udev/udev-rules.c +++ b/src/udev/udev-rules.c @@ -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; }