Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e81be34c authored by Leo Yan's avatar Leo Yan
Browse files

remount: Fix failure for system-as-root



Since commit 5ad7b3cb ("Try to remount mounted points only"), the
system-as-root cannot be remounted successfully when execute command
"adb remount".  This is because the mount point "/system" cannot be
found and directly bails out with failure.

Add an extra checking for the mount point "/system" for the
system-as-root case, takes it as a found entry; thus the function can
continue to run and fix up to remount root.

Suggested-by: default avatarDavid Anderson <dvander@google.com>
Signed-off-by: default avatarLeo Yan <leo.yan@linaro.org>
Change-Id: Ia936c9d97bed951184813a087c70fe591cb33fe0
parent 89ddf505
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -420,7 +420,8 @@ static int do_remount(int argc, char* argv[]) {
                break;
            }
            // Find overlayfs mount point?
            if ((mount_point == "/") && (rentry.mount_point == "/system")) {
            if ((mount_point == "/" && rentry.mount_point == "/system")  ||
                (mount_point == "/system" && rentry.mount_point == "/")) {
                blk_device = rentry.blk_device;
                mount_point = "/system";
                found = true;