When you went "losetup -d /dev/loop0 /dev/loop1" the error message was strange.

This commit is contained in:
Rob Landley 2005-12-21 17:00:25 +00:00
parent 9085467970
commit ce88793698
2 changed files with 3 additions and 2 deletions

View File

@ -1657,7 +1657,7 @@
"\t-f\t\toutput data as the log grows"
#define losetup_trivial_usage \
"[-od] LOOPDEVICE [FILE]\n"
"[-od] LOOPDEVICE [FILE]"
#define losetup_full_usage \
"Associate LOOPDEVICE with FILE, or display current association.\n\n" \
"Options:\n" \

View File

@ -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]);