Skip to content

Commit

Permalink
Don't remove "remount" from the option list during early parsing, the…
Browse files Browse the repository at this point in the history
… mount

flag doesn't get set right otherwise and it tries to overmount instead.
  • Loading branch information
landley committed Jul 11, 2017
1 parent 58fea0e commit d4adb3f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion toys/lsb/mount.c
Expand Up @@ -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;
Expand Down

0 comments on commit d4adb3f

Please sign in to comment.