Magellan Linux

Contents of /trunk/kmod/patches/0001-libkmod-module-probe-Fix-ignore-loaded-flag-not-bein.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1651 - (show annotations) (download)
Sat Feb 18 03:37:31 2012 UTC (12 years, 3 months ago) by niro
File size: 1203 byte(s)
-added upstream patches
1 From 269de2e0bf5011072da2f40f4f2d4023fad696b9 Mon Sep 17 00:00:00 2001
2 From: Lucas De Marchi <lucas.demarchi@profusion.mobi>
3 Date: Tue, 7 Feb 2012 09:48:59 -0200
4 Subject: [PATCH 01/10] libkmod-module: probe: Fix ignore-loaded flag not
5 being applied
6
7 ---
8 TODO | 3 +++
9 libkmod/libkmod-module.c | 3 ++-
10 2 files changed, 5 insertions(+), 1 deletions(-)
11
12 diff --git a/TODO b/TODO
13 index 23d7c76..6ab11f1 100644
14 --- a/TODO
15 +++ b/TODO
16 @@ -38,6 +38,9 @@ Features:
17
18 * Stop using system() inside the library and use fork + exec instead
19
20 +* Add tests for --show-depends: we need to first trap calls to
21 + kmod_module_get_path(), because it's printed to stdout/stderr.
22 +
23 Known Bugs:
24 ===========
25
26 diff --git a/libkmod/libkmod-module.c b/libkmod/libkmod-module.c
27 index 0af3e2e..b5eb7c9 100644
28 --- a/libkmod/libkmod-module.c
29 +++ b/libkmod/libkmod-module.c
30 @@ -1132,7 +1132,8 @@ KMOD_EXPORT int kmod_module_probe_insert_module(struct kmod_module *mod,
31 if (mod == NULL)
32 return -ENOENT;
33
34 - if (module_is_inkernel(mod)) {
35 + if (!(flags & KMOD_PROBE_IGNORE_LOADED)
36 + && module_is_inkernel(mod)) {
37 if (flags & KMOD_PROBE_FAIL_ON_LOADED)
38 return -EEXIST;
39 else
40 --
41 1.7.9
42