summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFelipe Franciosi <felipe@paradoxo.org>2015-09-30 22:07:16 +0100
committerFelipe Franciosi <felipe@paradoxo.org>2015-09-30 22:07:16 +0100
commit4302857b31a8e89ddeba0921fee06a1ff0237996 (patch)
treedc1d4487715f388aafb38ac735f64fb6a7e2949a /src
parent7ee7b225bd2fc3e7a3980f5fb7b10dfc6e205578 (diff)
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>
Diffstat (limited to 'src')
-rw-r--r--src/udev/udev-rules.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c
index d00f90afa6..31efde138d 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;
}