43 lines
1.2 KiB
Diff
43 lines
1.2 KiB
Diff
From 269de2e0bf5011072da2f40f4f2d4023fad696b9 Mon Sep 17 00:00:00 2001
|
|
From: Lucas De Marchi <lucas.demarchi@profusion.mobi>
|
|
Date: Tue, 7 Feb 2012 09:48:59 -0200
|
|
Subject: [PATCH 01/10] libkmod-module: probe: Fix ignore-loaded flag not
|
|
being applied
|
|
|
|
---
|
|
TODO | 3 +++
|
|
libkmod/libkmod-module.c | 3 ++-
|
|
2 files changed, 5 insertions(+), 1 deletions(-)
|
|
|
|
diff --git a/TODO b/TODO
|
|
index 23d7c76..6ab11f1 100644
|
|
--- a/TODO
|
|
+++ b/TODO
|
|
@@ -38,6 +38,9 @@ Features:
|
|
|
|
* Stop using system() inside the library and use fork + exec instead
|
|
|
|
+* Add tests for --show-depends: we need to first trap calls to
|
|
+ kmod_module_get_path(), because it's printed to stdout/stderr.
|
|
+
|
|
Known Bugs:
|
|
===========
|
|
|
|
diff --git a/libkmod/libkmod-module.c b/libkmod/libkmod-module.c
|
|
index 0af3e2e..b5eb7c9 100644
|
|
--- a/libkmod/libkmod-module.c
|
|
+++ b/libkmod/libkmod-module.c
|
|
@@ -1132,7 +1132,8 @@ KMOD_EXPORT int kmod_module_probe_insert_module(struct kmod_module *mod,
|
|
if (mod == NULL)
|
|
return -ENOENT;
|
|
|
|
- if (module_is_inkernel(mod)) {
|
|
+ if (!(flags & KMOD_PROBE_IGNORE_LOADED)
|
|
+ && module_is_inkernel(mod)) {
|
|
if (flags & KMOD_PROBE_FAIL_ON_LOADED)
|
|
return -EEXIST;
|
|
else
|
|
--
|
|
1.7.9
|
|
|