summaryrefslogtreecommitdiff
path: root/util-linux/losetup.c
diff options
context:
space:
mode:
authorRob Landley2005-12-21 17:00:25 +0000
committerRob Landley2005-12-21 17:00:25 +0000
commitce88793698eb7d53034ff4489f6d484f2b03f8ce (patch)
tree37cca22cb087752dba745f9ed6af6e38ce20be26 /util-linux/losetup.c
parent90854679703217971ebeafe34836473b2e1fff9b (diff)
downloadbusybox-ce88793698eb7d53034ff4489f6d484f2b03f8ce.zip
busybox-ce88793698eb7d53034ff4489f6d484f2b03f8ce.tar.gz
When you went "losetup -d /dev/loop0 /dev/loop1" the error message was strange.
Diffstat (limited to 'util-linux/losetup.c')
-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 b2af63d..44721bd 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]);