From ccb64d1eade3f9f0e325ba69de586dbd4bfb8241 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Mon, 16 Apr 2012 10:37:32 -0400 Subject: [PATCH] modprobe: handle -ENOENT return from init_module init_module returns -ENOENT when the module failed to load because of a bad parameter or unknown symbol. Throw a more descriptive error message than the generic "No such file or directory" to alert the user. Fixes Debian bug 668216. --- tools/kmod-modprobe.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/kmod-modprobe.c b/tools/kmod-modprobe.c index f6d47dc8..26b77133 100644 --- a/tools/kmod-modprobe.c +++ b/tools/kmod-modprobe.c @@ -607,6 +607,11 @@ static int insmod(struct kmod_ctx *ctx, const char *alias, ERR("could not insert '%s': Module already in kernel\n", kmod_module_get_name(mod)); break; + case -ENOENT: + ERR("could not insert '%s': Unknown symbol in module, " + "or unknown parameter (see dmesg)\n", + kmod_module_get_name(mod)); + break; default: ERR("could not insert '%s': %s\n", kmod_module_get_name(mod), -- 2.47.2