svn commit: trunk/busybox/util-linux

vda at busybox.net vda at busybox.net
Sat Oct 18 19:15:58 UTC 2008


Author: vda
Date: 2008-10-18 12:15:57 -0700 (Sat, 18 Oct 2008)
New Revision: 23713

Log:
mount: -o parm1 -o parm2 should accumulate



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


Changeset:
Modified: trunk/busybox/util-linux/mount.c
===================================================================
--- trunk/busybox/util-linux/mount.c	2008-10-18 19:04:37 UTC (rev 23712)
+++ trunk/busybox/util-linux/mount.c	2008-10-18 19:15:57 UTC (rev 23713)
@@ -1754,7 +1754,7 @@
 	char *cmdopts = xstrdup("");
 	char *fstype = NULL;
 	char *storage_path;
-	char *opt_o;
+	llist_t *lst_o = NULL;
 	const char *fstabname;
 	FILE *fstab;
 	int i, j, rc = 0;
@@ -1776,10 +1776,10 @@
 
 	// Parse remaining options
 	// Max 2 params; -v is a counter
-	opt_complementary = "?2" USE_FEATURE_MOUNT_VERBOSE(":vv");
-	opt = getopt32(argv, OPTION_STR, &opt_o, &fstype
+	opt_complementary = "?2o::" USE_FEATURE_MOUNT_VERBOSE(":vv");
+	opt = getopt32(argv, OPTION_STR, &lst_o, &fstype
 			USE_FEATURE_MOUNT_VERBOSE(, &verbose));
-	if (opt & OPT_o) append_mount_options(&cmdopts, opt_o); // -o
+	while (lst_o) append_mount_options(&cmdopts, llist_pop(&lst_o)); // -o
 	if (opt & OPT_r) append_mount_options(&cmdopts, "ro"); // -r
 	if (opt & OPT_w) append_mount_options(&cmdopts, "rw"); // -w
 	argv += optind;




More information about the busybox-cvs mailing list