diff options
-rw-r--r-- | TODO | 3 | ||||
-rw-r--r-- | udev_rules.c | 38 | ||||
-rw-r--r-- | udev_rules.h | 1 | ||||
-rw-r--r-- | udev_rules_parse.c | 6 |
4 files changed, 0 insertions, 48 deletions
@@ -10,9 +10,6 @@ udev version: o remove broken %e enumeration (simple enumerations can't work and should go) - o remove MODALIAS + $modalias - (ENV{MODALIAS}, $env{MODALIAS}, $sysfs{modalias} will do it) - o remove udevstart (we rely on the kernel "uevent" triggers of kernel 2.6.15 and no longer want to guess event properties from sysfs like udevstart is doing it) diff --git a/udev_rules.c b/udev_rules.c index ee4632513a..03b3f2a116 100644 --- a/udev_rules.c +++ b/udev_rules.c @@ -401,7 +401,6 @@ void udev_rules_apply_format(struct udevice *udev, char *string, size_t maxsize) SUBST_PARENT, SUBST_TEMP_NODE, SUBST_ROOT, - SUBST_MODALIAS, SUBST_ENV, }; static const struct subst_map { @@ -421,7 +420,6 @@ void udev_rules_apply_format(struct udevice *udev, char *string, size_t maxsize) { .name = "parent", .fmt = 'P', .type = SUBST_PARENT }, { .name = "tempnode", .fmt = 'N', .type = SUBST_TEMP_NODE }, { .name = "root", .fmt = 'r', .type = SUBST_ROOT }, - { .name = "modalias", .fmt = 'A', .type = SUBST_MODALIAS }, { .name = "env", .fmt = 'E', .type = SUBST_ENV }, { NULL, '\0', 0 } }; @@ -618,24 +616,6 @@ found: strlcat(string, udev_root, maxsize); dbg("substitute udev_root '%s'", udev_root); break; - case SUBST_MODALIAS: - { - const char *value; - static int warn = 1; - - if (warn) { - err("$modalias is deprecated, use $env{MODALIAS} or " - "$sysfs{modalias} instead."); - warn = 0; - } - - value = sysfs_attr_get_value(udev->dev->devpath, "modalias"); - if (value != NULL) { - strlcat(string, value, maxsize); - dbg("substitute MODALIAS '%s'", temp2); - } - } - break; case SUBST_ENV: if (attr == NULL) { dbg("missing attribute"); @@ -730,24 +710,6 @@ static int match_rule(struct udevice *udev, struct udev_rule *rule) if (match_key("NAME", rule, &rule->name, udev->name)) goto nomatch; - if (rule->modalias.operation != KEY_OP_UNSET) { - const char *value; - static int warn = 1; - - if (warn) { - err("MODALIAS is deprecated, use ENV{MODALIAS} or SYSFS{modalias} instead."); - warn = 0; - } - - value = sysfs_attr_get_value(udev->dev->devpath, "modalias"); - if (value == NULL) { - dbg("MODALIAS value not found"); - goto nomatch; - } - if (match_key("MODALIAS", rule, &rule->modalias, value)) - goto nomatch; - } - for (i = 0; i < rule->env.count; i++) { struct key_pair *pair = &rule->env.keys[i]; diff --git a/udev_rules.h b/udev_rules.h index e4d5ebd765..2c956fcccc 100644 --- a/udev_rules.h +++ b/udev_rules.h @@ -71,7 +71,6 @@ struct udev_rule { struct key driver; struct key program; struct key result; - struct key modalias; struct key import; enum import_type import_type; struct key wait_for_sysfs; diff --git a/udev_rules_parse.c b/udev_rules_parse.c index 91cc9744fb..271de6f879 100644 --- a/udev_rules_parse.c +++ b/udev_rules_parse.c @@ -374,12 +374,6 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena continue; } - if (strcasecmp(key, "MODALIAS") == 0) { - add_rule_key(rule, &rule->modalias, operation, value); - valid = 1; - continue; - } - if (strncasecmp(key, "IMPORT", sizeof("IMPORT")-1) == 0) { attr = get_key_attribute(key + sizeof("IMPORT")-1); if (attr && strstr(attr, "program")) { |