diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2007-02-01 20:23:41 +0100 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2007-02-01 20:23:41 +0100 |
commit | 273bebdba66cd5543dc1b076447e3275c81c221c (patch) | |
tree | a0ceba63a33b4b6fedb280f0b7e48b8f6746c392 /udev_rules_parse.c | |
parent | c0c865d4664ea10309b0ffc12b2fad19ecb98129 (diff) |
exclude parent devices from DRIVER== match
We have DRIVERS= for this.
Diffstat (limited to 'udev_rules_parse.c')
-rw-r--r-- | udev_rules_parse.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/udev_rules_parse.c b/udev_rules_parse.c index 3f7e43f839..00b53285fa 100644 --- a/udev_rules_parse.c +++ b/udev_rules_parse.c @@ -307,15 +307,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena } if (strcasecmp(key, "DRIVER") == 0) { - if (operation != KEY_OP_MATCH && - operation != KEY_OP_NOMATCH) { - err("invalid DRIVER operation"); - goto invalid; - } - err("DRIVER== will change in a future relase, " - "please use DRIVERS== in %s:%u", filename, lineno); - /* FIXME: this should be rule->driver to match only the event device */ - add_rule_key(rule, &rule->drivers, operation, value); + add_rule_key(rule, &rule->driver, operation, value); valid = 1; continue; } @@ -369,6 +361,11 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena if (strncasecmp(key, "ATTRS{", sizeof("ATTRS{")-1) == 0 || strncasecmp(key, "SYSFS{", sizeof("SYSFS{")-1) == 0) { + if (operation != KEY_OP_MATCH && + operation != KEY_OP_NOMATCH) { + err("invalid ATTRS operation"); + goto invalid; + } attr = get_key_attribute(key + sizeof("ATTRS")-1); if (attr == NULL) { err("error parsing ATTRS attribute"); |