rmmod: fix bad error message
Before:
># busybox_old rmmod gtrhfhdfghdf
rmmod: can't unload 'gtrhfhdfghdf': unknown symbol in module, or unknown parameter
After:
># busybox rmmod gtrhfhdfghdf
rmmod: can't unload module 'gtrhfhdfghdf': No such file or directory
function old new delta
modprobe_main 726 721 -5
do_modprobe 599 590 -9
rmmod_main 187 169 -18
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-32) Total: -32 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
diff --git a/modutils/modutils.c b/modutils/modutils.c
index 84300d9..ef4134a 100644
--- a/modutils/modutils.c
+++ b/modutils/modutils.c
@@ -190,6 +190,11 @@
return errno;
}
+/* Note: not suitable for delete_module() errnos.
+ * For them, probably only EWOULDBLOCK needs explaining:
+ * "Other modules depend on us". So far we don't do such
+ * translation and don't use moderror() for removal errors.
+ */
const char* FAST_FUNC moderror(int err)
{
switch (err) {