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 <felipe@paradoxo.org>
This commit is contained in:
Felipe Franciosi
2015-09-30 22:07:16 +01:00
parent 7ee7b225bd
commit 4302857b31
+2 -1
View 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;
}