24 lines
1.0 KiB
Diff
24 lines
1.0 KiB
Diff
From e331e06a3910ef3fe6837f3e93a48123a7cc822b Mon Sep 17 00:00:00 2001
|
|
From: Harald Hoyer <harald@redhat.com>
|
|
Date: Wed, 18 Jul 2018 12:41:01 +0200
|
|
Subject: [PATCH] dracut-install: skip modules with empty path
|
|
|
|
if kmod_module_get_path(module) returns NULL, skip the module
|
|
---
|
|
install/dracut-install.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/install/dracut-install.c b/install/dracut-install.c
|
|
index 001225b4..88bca1d4 100644
|
|
--- a/install/dracut-install.c
|
|
+++ b/install/dracut-install.c
|
|
@@ -1244,7 +1244,7 @@ static int install_dependent_modules(struct kmod_list *modlist)
|
|
path = kmod_module_get_path(mod);
|
|
|
|
name = kmod_module_get_name(mod);
|
|
- if (arg_mod_filter_noname && (regexec(&mod_filter_noname, name, 0, NULL, 0) == 0)) {
|
|
+ if ((path == NULL) || (arg_mod_filter_noname && (regexec(&mod_filter_noname, name, 0, NULL, 0) == 0))) {
|
|
kmod_module_unref(mod);
|
|
continue;
|
|
}
|