svn commit: trunk/busybox: include util-linux

landley at busybox.net landley at busybox.net
Wed Dec 21 17:00:27 UTC 2005


Author: landley
Date: 2005-12-21 09:00:25 -0800 (Wed, 21 Dec 2005)
New Revision: 12971

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


Modified:
   trunk/busybox/include/usage.h
   trunk/busybox/util-linux/losetup.c


Changeset:
Modified: trunk/busybox/include/usage.h
===================================================================
--- trunk/busybox/include/usage.h	2005-12-21 16:53:57 UTC (rev 12970)
+++ trunk/busybox/include/usage.h	2005-12-21 17:00:25 UTC (rev 12971)
@@ -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" \

Modified: trunk/busybox/util-linux/losetup.c
===================================================================
--- trunk/busybox/util-linux/losetup.c	2005-12-21 16:53:57 UTC (rev 12970)
+++ trunk/busybox/util-linux/losetup.c	2005-12-21 17:00:25 UTC (rev 12971)
@@ -33,7 +33,8 @@
   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]);
 




More information about the busybox-cvs mailing list