tools/modinfo: exit non-zero on module not found

This commit is contained in:
Dave Reisner 2012-01-05 22:56:53 -05:00 committed by Lucas De Marchi
parent b30a71b8e8
commit 5f85a133f8

View File

@ -279,6 +279,12 @@ static int modinfo_alias_do(struct kmod_ctx *ctx, const char *alias)
LOG("Module alias %s not found.\n", alias);
return err;
}
if (list == NULL) {
LOG("Module %s not found.\n", alias);
return -ENOENT;
}
kmod_list_foreach(l, list) {
struct kmod_module *mod = kmod_module_get_module(l);
int r = modinfo_do(mod);