Add errno.h
[oweals/busybox.git] / rmmod.c
diff --git a/rmmod.c b/rmmod.c
index f5d7d359a2f889521e1814dabf4d30b68e6a8c79..52adc7bcd85edc65d33b56e557c5aef7a013fc5b 100644 (file)
--- a/rmmod.c
+++ b/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++;