summaryrefslogtreecommitdiff
path: root/testing/kmod/0002-depmod-report-failures-in-loading-symbols.patch
diff options
context:
space:
mode:
Diffstat (limited to 'testing/kmod/0002-depmod-report-failures-in-loading-symbols.patch')
-rw-r--r--testing/kmod/0002-depmod-report-failures-in-loading-symbols.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/testing/kmod/0002-depmod-report-failures-in-loading-symbols.patch b/testing/kmod/0002-depmod-report-failures-in-loading-symbols.patch
new file mode 100644
index 000000000..90c58d5da
--- /dev/null
+++ b/testing/kmod/0002-depmod-report-failures-in-loading-symbols.patch
@@ -0,0 +1,34 @@
+From 819f79a24d58e3c8429f1631df2f8f85a2f95d4a Mon Sep 17 00:00:00 2001
+From: Dave Reisner <dreisner@archlinux.org>
+Date: Mon, 7 May 2012 19:41:42 -0400
+Subject: [PATCH 2/2] depmod: report failures in loading symbols
+
+Previously, depmod would relegate failures of kmod_module_get_symbols()
+to debug output, assuming the "error" was simply a lack of symbols.
+Leave the ENOENT return to debug output, but report anything else as a
+real error.
+---
+ tools/kmod-depmod.c | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/tools/kmod-depmod.c b/tools/kmod-depmod.c
+index e89dff6..bceb407 100644
+--- a/tools/kmod-depmod.c
++++ b/tools/kmod-depmod.c
+@@ -1542,8 +1542,11 @@ static int depmod_load_symbols(struct depmod *depmod)
+ struct kmod_list *l, *list = NULL;
+ int err = kmod_module_get_symbols(mod->kmod, &list);
+ if (err < 0) {
+- DBG("ignoring %s: no symbols: %s\n",
+- mod->path, strerror(-err));
++ if (err == -ENOENT)
++ DBG("ignoring %s: no symbols\n", mod->path);
++ else
++ ERR("failed to load symbols from %s: %s\n",
++ mod->path, strerror(-err));
+ continue;
+ }
+ kmod_list_foreach(l, list) {
+--
+1.7.10.1
+