aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2017-07-11 05:17:35 -0500
committerRob Landley <rob@landley.net>2017-07-11 05:17:35 -0500
commitd4adb3f8e2ec39674e34ed518983ed6e85560c91 (patch)
tree9ef31b4338b81ae98664e73bac0e268738538336
parent58fea0ea98ed7145f15acc851b8dbaa17e111ebd (diff)
downloadtoybox-d4adb3f8e2ec39674e34ed518983ed6e85560c91.tar.gz
Don't remove "remount" from the option list during early parsing, the mount
flag doesn't get set right otherwise and it tries to overmount instead.
-rw-r--r--toys/lsb/mount.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toys/lsb/mount.c b/toys/lsb/mount.c
index daf2edca..0fd9dc52 100644
--- a/toys/lsb/mount.c
+++ b/toys/lsb/mount.c
@@ -300,7 +300,7 @@ void mount_main(void)
// For remount we need _last_ match (in case of overmounts), so traverse
// in reverse order. (Yes I'm using remount as a boolean for a bit here,
// the double cast is to get gcc to shut up about it.)
- remount = (void *)(long)comma_scan(opts, "remount", 1);
+ remount = (void *)(long)comma_scan(opts, "remount", 0);
if (((toys.optflags & FLAG_a) && !access("/proc/mounts", R_OK)) || remount) {
mm = dlist_terminate(mtl = mtl2 = xgetmountlist(0));
if (remount) remount = mm;