From: Rob Landley Date: Wed, 21 Dec 2005 17:00:25 +0000 (-0000) Subject: When you went "losetup -d /dev/loop0 /dev/loop1" the error message was strange. X-Git-Tag: 1_1_0~386 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=ce88793698eb7d53034ff4489f6d484f2b03f8ce;p=oweals%2Fbusybox.git When you went "losetup -d /dev/loop0 /dev/loop1" the error message was strange. --- diff --git a/include/usage.h b/include/usage.h index 12c45b45f..9de9df8f3 100644 --- a/include/usage.h +++ b/include/usage.h @@ -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" \ 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]);