]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
dracut-install: skip modules with empty path
authorHarald Hoyer <harald@redhat.com>
Wed, 18 Jul 2018 10:41:01 +0000 (12:41 +0200)
committerHarald Hoyer <harald@redhat.com>
Wed, 18 Jul 2018 10:42:02 +0000 (12:42 +0200)
if kmod_module_get_path(module) returns NULL, skip the module

install/dracut-install.c

index 001225b40f97ad78ca16425ae0a2a597e5dcb365..88bca1d441d5a4c7bcde186cd33411dd16aff31d 100644 (file)
@@ -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;
                 }