mirror of
https://github.com/AuxXxilium/kmod.git
synced 2025-02-05 08:25:31 +07:00
depmod: warn on invalid devname specification
During the last merge window (3.12) a couple of modules gained devname aliases, but without the necessary major and minor information. These were then silently ignored when generating modules.devname. Complain loudly to avoid such errors sneaking in undetected in the future: depmod: ERROR: Module 'zram' has devname (zram) but lacks major and minor information. Ignoring. depmod: ERROR: Module 'uhid' has devname (uhid) but lacks major and minor information. Ignoring. Cc: Kay Sievers <kay@vrfy.org> Cc: Lucas De Marchi <lucas.demarchi@profusion.mobi>
This commit is contained in:
parent
4c2dc16a2e
commit
6506ddf5a3
@ -2112,11 +2112,18 @@ static int output_devname(struct depmod *depmod, FILE *out)
|
||||
minor = min;
|
||||
}
|
||||
|
||||
if (type != '\0' && devname != NULL) {
|
||||
if (type != '\0' && devname != NULL)
|
||||
break;
|
||||
}
|
||||
|
||||
if (devname != NULL) {
|
||||
if (type != '\0')
|
||||
fprintf(out, "%s %s %c%u:%u\n", mod->modname,
|
||||
devname, type, major, minor);
|
||||
break;
|
||||
}
|
||||
else
|
||||
ERR("Module '%s' has devname (%s) but "
|
||||
"lacks major and minor information. "
|
||||
"Ignoring.\n", mod->modname, devname);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user