aboutsummaryrefslogtreecommitdiff
path: root/modutils/modprobe.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2015-10-24 04:17:04 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2015-10-24 04:17:04 +0200
commitcd13974b201972ffb605e243f63f674e95b99e5c (patch)
treecbc62c9de34aab6065d76074e4369903b98f679b /modutils/modprobe.c
parent2e9a0662bce58b0fe838f7e1e03c35c4765ff3bc (diff)
downloadbusybox-w32-cd13974b201972ffb605e243f63f674e95b99e5c.tar.gz
busybox-w32-cd13974b201972ffb605e243f63f674e95b99e5c.tar.bz2
busybox-w32-cd13974b201972ffb605e243f63f674e95b99e5c.zip
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>
Diffstat (limited to 'modutils/modprobe.c')
-rw-r--r--modutils/modprobe.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/modutils/modprobe.c b/modutils/modprobe.c
index 314a7a1cb..952ba0377 100644
--- a/modutils/modprobe.c
+++ b/modutils/modprobe.c
@@ -461,9 +461,8 @@ static int do_modprobe(struct module_entry *m)
461 rc = bb_delete_module(m2->modname, O_EXCL); 461 rc = bb_delete_module(m2->modname, O_EXCL);
462 if (rc) { 462 if (rc) {
463 if (first) { 463 if (first) {
464 bb_error_msg("can't unload module %s: %s", 464 bb_perror_msg("can't unload module %s",
465 humanly_readable_name(m2), 465 humanly_readable_name(m2));
466 moderror(rc));
467 break; 466 break;
468 } 467 }
469 } else { 468 } else {
@@ -622,7 +621,7 @@ int modprobe_main(int argc UNUSED_PARAM, char **argv)
622 * autoclean will be removed". 621 * autoclean will be removed".
623 */ 622 */
624 if (bb_delete_module(NULL, O_NONBLOCK | O_EXCL) != 0) 623 if (bb_delete_module(NULL, O_NONBLOCK | O_EXCL) != 0)
625 bb_perror_msg_and_die("rmmod"); 624 bb_perror_nomsg_and_die();
626 } 625 }
627 return EXIT_SUCCESS; 626 return EXIT_SUCCESS;
628 } 627 }