From: Dave Reisner Date: Mon, 16 Apr 2012 14:37:32 +0000 (-0400) Subject: modprobe: handle -ENOENT return from init_module X-Git-Tag: v8~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ccb64d1eade3f9f0e325ba69de586dbd4bfb8241;p=thirdparty%2Fkmod.git 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. --- 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),