1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
reversed changeset 273bebdba66cd5543dc1b076447e3275c81c221c
--- b/udev_rules_parse.c
+++ a/udev_rules_parse.c
@@ -307,7 +307,15 @@
}
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;
}
@@ -361,11 +369,6 @@
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");
|