aboutsummaryrefslogtreecommitdiff
path: root/util-linux
diff options
context:
space:
mode:
Diffstat (limited to 'util-linux')
-rw-r--r--util-linux/losetup.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/util-linux/losetup.c b/util-linux/losetup.c
index b2af63dc0..44721bd34 100644
--- a/util-linux/losetup.c
+++ b/util-linux/losetup.c
@@ -33,7 +33,8 @@ int losetup_main (int argc, char **argv)
switch(getopt(argc,argv, "do:")) {
case 'd':
/* detach takes exactly one argument */
- if(optind+1==argc && !del_loop(argv[optind])) return EXIT_SUCCESS;
+ if(optind+1!=argc) bb_show_usage();
+ if(!del_loop(argv[optind])) return EXIT_SUCCESS;
die_failed:
bb_perror_msg_and_die("%s",argv[optind]);