Skip to content

Commit 2536a9e

Browse files
committed
fix(install): handle builtin modules
If a `kmod_module` is missing the `path`, it is `builtin`.
1 parent 8c0fcdd commit 2536a9e

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

install/dracut-install.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1572,6 +1572,13 @@ static int install_module(struct kmod_module *mod)
15721572
const char *name = NULL;
15731573

15741574
name = kmod_module_get_name(mod);
1575+
1576+
path = kmod_module_get_path(mod);
1577+
if (!path) {
1578+
log_debug("dracut_install '%s' is a builtin kernel module", name);
1579+
return 0;
1580+
}
1581+
15751582
if (arg_mod_filter_noname && (regexec(&mod_filter_noname, name, 0, NULL, 0) == 0)) {
15761583
log_debug("dracut_install '%s' is excluded", name);
15771584
return 0;
@@ -1582,10 +1589,6 @@ static int install_module(struct kmod_module *mod)
15821589
return 0;
15831590
}
15841591

1585-
path = kmod_module_get_path(mod);
1586-
if (!path)
1587-
return -ENOENT;
1588-
15891592
if (check_hashmap(items_failed, path))
15901593
return -1;
15911594

0 commit comments

Comments
 (0)