On Thursday 16 October 2008 10:16:27 pm Engelmayer Christian wrote:
> > For debugging yesterday I never had an issue with BB 1.12.1
> > mount -oremount,rw /
> 
> thx for the hint.
> 
> fails: mount -o remount -o rw /mnt/myMountPoint
> works: mount -o remount,rw /mnt/myMountPoint

Oh my. -o was not cumulative. It just uses the last parameter...
Fix:


Index: util-linux/mount.c
===================================================================
--- util-linux/mount.c  (revision 23711)
+++ util-linux/mount.c  (working copy)
@@ -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;
_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox

Reply via email to