summaryrefslogtreecommitdiff
path: root/udev_rules_parse.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2007-06-03 00:01:46 +0200
committerKay Sievers <kay.sievers@vrfy.org>2007-06-03 00:01:46 +0200
commit953249a3a01cbd442b42558168da6c76a92a0e40 (patch)
tree1b7c3d8c91da6cc04eec719badc9d099d2c3fa9e /udev_rules_parse.c
parent5e9eb88f2f6d99eaee16aeeb76ac08a1bf98a668 (diff)
add TEST=="<file>" key
Diffstat (limited to 'udev_rules_parse.c')
-rw-r--r--udev_rules_parse.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/udev_rules_parse.c b/udev_rules_parse.c
index 9166980488..4420616903 100644
--- a/udev_rules_parse.c
+++ b/udev_rules_parse.c
@@ -470,6 +470,15 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena
continue;
}
+ if (strncasecmp(key, "TEST", sizeof("TEST")-1) == 0) {
+ attr = get_key_attribute(key + sizeof("TEST")-1);
+ if (attr != NULL)
+ rule->test_mode_mask = strtol(attr, NULL, 8);
+ add_rule_key(rule, &rule->test, operation, value);
+ valid = 1;
+ continue;
+ }
+
if (strcasecmp(key, "RUN") == 0) {
add_rule_key(rule, &rule->run, operation, value);
valid = 1;