From cd13974b201972ffb605e243f63f674e95b99e5c Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Sat, 24 Oct 2015 04:17:04 +0200 Subject: 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 --- modutils/modutils.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'modutils/modutils.c') diff --git a/modutils/modutils.c b/modutils/modutils.c index 84300d931..ef4134af5 100644 --- a/modutils/modutils.c +++ b/modutils/modutils.c @@ -190,6 +190,11 @@ int FAST_FUNC bb_delete_module(const char *module, unsigned int flags) 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) { -- cgit v1.2.3-55-g6feb