chiark / gitweb /
remove MODALIAS key and substitution
authorKay Sievers <kay.sievers@suse.de>
Wed, 7 Jun 2006 14:00:34 +0000 (16:00 +0200)
committerKay Sievers <kay.sievers@suse.de>
Wed, 7 Jun 2006 14:00:34 +0000 (16:00 +0200)
TODO
udev_rules.c
udev_rules.h
udev_rules_parse.c

diff --git a/TODO b/TODO
index 719f345..ba12632 100644 (file)
--- a/TODO
+++ b/TODO
@@ -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)
index ee46325..03b3f2a 100644 (file)
@@ -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];
 
index e4d5ebd..2c956fc 100644 (file)
@@ -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;
index 91cc974..271de6f 100644 (file)
@@ -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")) {