aboutsummaryrefslogtreecommitdiff
path: root/rmmod.c
diff options
context:
space:
mode:
Diffstat (limited to 'rmmod.c')
-rw-r--r--rmmod.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/rmmod.c b/rmmod.c
index f5d7d359a..52adc7bcd 100644
--- a/rmmod.c
+++ b/rmmod.c
@@ -45,10 +45,8 @@ extern int rmmod_main(int argc, char **argv)
45 switch (**argv) { 45 switch (**argv) {
46 case 'a': 46 case 'a':
47 /* Unload _all_ unused modules via NULL delete_module() call */ 47 /* Unload _all_ unused modules via NULL delete_module() call */
48 if (delete_module(NULL)) { 48 if (delete_module(NULL))
49 perror("rmmod"); 49 perror_msg_and_die("rmmod");
50 return EXIT_FAILURE;
51 }
52 return EXIT_SUCCESS; 50 return EXIT_SUCCESS;
53 default: 51 default:
54 usage(rmmod_usage); 52 usage(rmmod_usage);
@@ -58,7 +56,7 @@ extern int rmmod_main(int argc, char **argv)
58 56
59 while (argc-- > 0) { 57 while (argc-- > 0) {
60 if (delete_module(*argv) < 0) { 58 if (delete_module(*argv) < 0) {
61 perror(*argv); 59 perror_msg("%s", *argv);
62 ret = EXIT_FAILURE; 60 ret = EXIT_FAILURE;
63 } 61 }
64 argv++; 62 argv++;