20 lines
625 B
Diff
20 lines
625 B
Diff
Fixes modprobe --show-depends for some modules i.e ahci
|
|
from dreisner@archlinux
|
|
|
|
diff --git a/libkmod/libkmod-module.c b/libkmod/libkmod-module.c
|
|
index 0af3e2e..14a0a3d 100644
|
|
--- libkmod/libkmod-module.c
|
|
+++ libkmod/libkmod-module.c
|
|
@@ -1132,7 +1132,9 @@ KMOD_EXPORT int kmod_module_probe_insert_module(struct kmod_module *mod,
|
|
if (mod == NULL)
|
|
return -ENOENT;
|
|
|
|
- if (module_is_inkernel(mod)) {
|
|
+ /* ignore module state if this is only for a dry run */
|
|
+ if (!(flags & KMOD_PROBE_DRY_RUN) && print_action == NULL &&
|
|
+ module_is_inkernel(mod)) {
|
|
if (flags & KMOD_PROBE_FAIL_ON_LOADED)
|
|
return -EEXIST;
|
|
else
|
|
|