diff options
author | Mark Salyzyn <salyzyn@google.com> | 2019-03-05 12:00:10 -0800 |
---|---|---|
committer | Mark Salyzyn <salyzyn@google.com> | 2019-03-06 08:25:36 -0800 |
commit | 3babd8488b1ec7c77cdd91374837832f73fa5c26 (patch) | |
tree | 4873844062ae124a1d9ce476c5b1472758fb4e60 /fs_mgr/fs_mgr_remount.cpp | |
parent | 448fc9783cf9255f65f1eb8630b402b3bb6dcc14 (diff) | |
download | system_core-3babd8488b1ec7c77cdd91374837832f73fa5c26.tar.gz system_core-3babd8488b1ec7c77cdd91374837832f73fa5c26.tar.bz2 system_core-3babd8488b1ec7c77cdd91374837832f73fa5c26.zip |
fs_mgr: remount: pull root device from fstab
For devices that do not support overlayfs that are system as root,
need to pull /dev/root device from / mount point in fstab.
Test: adb-remount-test.sh
Bug: 126256072
Change-Id: I198c0e8c60770508737318afde95db2966294ff5
Diffstat (limited to 'fs_mgr/fs_mgr_remount.cpp')
-rw-r--r-- | fs_mgr/fs_mgr_remount.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs_mgr/fs_mgr_remount.cpp b/fs_mgr/fs_mgr_remount.cpp index 631273457..bb85a3736 100644 --- a/fs_mgr/fs_mgr_remount.cpp +++ b/fs_mgr/fs_mgr_remount.cpp @@ -346,11 +346,15 @@ int main(int argc, char* argv[]) { break; } if ((mount_point == "/") && (rentry.mount_point == "/system")) { - if (blk_device != "/dev/root") blk_device = rentry.blk_device; + blk_device = rentry.blk_device; mount_point = "/system"; break; } } + if (blk_device == "/dev/root") { + auto from_fstab = GetEntryForMountPoint(&fstab, mount_point); + if (from_fstab) blk_device = from_fstab->blk_device; + } fs_mgr_set_blk_ro(blk_device, false); // Now remount! |