aboutsummaryrefslogtreecommitdiff
path: root/modutils/rmmod.c
diff options
context:
space:
mode:
authorMatt Kraai <kraai@debian.org>2000-12-22 01:48:07 +0000
committerMatt Kraai <kraai@debian.org>2000-12-22 01:48:07 +0000
commita9819b290848e0a760f3805d5937fa050235d707 (patch)
treeb8cb8d939032c0806d62161b01e5836cb808dc3f /modutils/rmmod.c
parente9f07fb6e83b75a50760599a5d31f494841eddf7 (diff)
downloadbusybox-a9819b290848e0a760f3805d5937fa050235d707.tar.gz
Use busybox error handling functions wherever possible.
Diffstat (limited to 'modutils/rmmod.c')
-rw-r--r--modutils/rmmod.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/modutils/rmmod.c b/modutils/rmmod.c
index f5d7d359a..52adc7bcd 100644
--- a/modutils/rmmod.c
+++ b/modutils/rmmod.c
@@ -45,10 +45,8 @@ extern int rmmod_main(int argc, char **argv)
switch (**argv) {
case 'a':
/* Unload _all_ unused modules via NULL delete_module() call */
- if (delete_module(NULL)) {
- perror("rmmod");
- return EXIT_FAILURE;
- }
+ if (delete_module(NULL))
+ perror_msg_and_die("rmmod");
return EXIT_SUCCESS;
default:
usage(rmmod_usage);
@@ -58,7 +56,7 @@ extern int rmmod_main(int argc, char **argv)
while (argc-- > 0) {
if (delete_module(*argv) < 0) {
- perror(*argv);
+ perror_msg("%s", *argv);
ret = EXIT_FAILURE;
}
argv++;