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)
SUBST_PARENT,
SUBST_TEMP_NODE,
SUBST_ROOT,
- SUBST_MODALIAS,
SUBST_ENV,
};
static const struct subst_map {
{ .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 }
};
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");
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];
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")) {