Skip to content

Commit

Permalink
fix(install): handle builtin modules
Browse files Browse the repository at this point in the history
If a `kmod_module` is missing the `path`, it is `builtin`.
  • Loading branch information
haraldh committed Mar 30, 2021
1 parent 8c0fcdd commit 2536a9e
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions install/dracut-install.c
Expand Up @@ -1572,6 +1572,13 @@ static int install_module(struct kmod_module *mod)
const char *name = NULL;

name = kmod_module_get_name(mod);

path = kmod_module_get_path(mod);
if (!path) {
log_debug("dracut_install '%s' is a builtin kernel module", name);
return 0;
}

if (arg_mod_filter_noname && (regexec(&mod_filter_noname, name, 0, NULL, 0) == 0)) {
log_debug("dracut_install '%s' is excluded", name);
return 0;
Expand All @@ -1582,10 +1589,6 @@ static int install_module(struct kmod_module *mod)
return 0;
}

path = kmod_module_get_path(mod);
if (!path)
return -ENOENT;

if (check_hashmap(items_failed, path))
return -1;

Expand Down

0 comments on commit 2536a9e

Please sign in to comment.