svn commit: trunk/busybox/util-linux

vda at busybox.net vda at busybox.net
Wed Feb 13 17:25:32 UTC 2008


Author: vda
Date: 2008-02-13 09:25:31 -0800 (Wed, 13 Feb 2008)
New Revision: 21008

Log:
switch_root: stop at first non-option. Closes bug 1425.



Modified:
   trunk/busybox/util-linux/switch_root.c


Changeset:
Modified: trunk/busybox/util-linux/switch_root.c
===================================================================
--- trunk/busybox/util-linux/switch_root.c	2008-02-13 17:06:53 UTC (rev 21007)
+++ trunk/busybox/util-linux/switch_root.c	2008-02-13 17:25:31 UTC (rev 21008)
@@ -73,8 +73,8 @@
 
 	// Parse args (-c console)
 
-	opt_complementary = "-2";
-	getopt32(argv, "c:", &console);
+	opt_complementary = "-2"; // minimum 2 params
+	getopt32(argv, "+c:", &console); // '+': stop parsing at first non-option
 	argv += optind;
 
 	// Change to new root directory and verify it's a different fs.




More information about the busybox-cvs mailing list