]> git.ipfire.org Git - thirdparty/kmod.git/commitdiff
depmod: report failures in loading symbols
authorDave Reisner <dreisner@archlinux.org>
Mon, 7 May 2012 23:41:42 +0000 (19:41 -0400)
committerLucas De Marchi <lucas.demarchi@profusion.mobi>
Tue, 8 May 2012 13:22:14 +0000 (10:22 -0300)
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

index e89dff6fc48ccb72c8dbdef5b7aa2e0f53567478..bceb40757c22d2fc5f4414b07cd609e6424cefbb 100644 (file)
@@ -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) {