Merge "fs_mgr: remount: system is root" am: 2b8e96bd64
am: 81e08d4c98
Change-Id: I31b0c419f36eb1019e8a981bd7a181c765d4a86f
This commit is contained in:
commit
a8611c0982
1 changed files with 7 additions and 0 deletions
|
|
@ -340,6 +340,7 @@ int main(int argc, char* argv[]) {
|
||||||
blk_device = rentry.blk_device;
|
blk_device = rentry.blk_device;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
// Find overlayfs mount point?
|
||||||
if ((mount_point == "/") && (rentry.mount_point == "/system")) {
|
if ((mount_point == "/") && (rentry.mount_point == "/system")) {
|
||||||
blk_device = rentry.blk_device;
|
blk_device = rentry.blk_device;
|
||||||
mount_point = "/system";
|
mount_point = "/system";
|
||||||
|
|
@ -352,6 +353,12 @@ int main(int argc, char* argv[]) {
|
||||||
}
|
}
|
||||||
fs_mgr_set_blk_ro(blk_device, false);
|
fs_mgr_set_blk_ro(blk_device, false);
|
||||||
|
|
||||||
|
// Find system-as-root mount point?
|
||||||
|
if ((mount_point == "/system") && !GetEntryForMountPoint(&mounts, mount_point) &&
|
||||||
|
GetEntryForMountPoint(&mounts, "/")) {
|
||||||
|
mount_point = "/";
|
||||||
|
}
|
||||||
|
|
||||||
// Now remount!
|
// Now remount!
|
||||||
if (::mount(blk_device.c_str(), mount_point.c_str(), entry.fs_type.c_str(), MS_REMOUNT,
|
if (::mount(blk_device.c_str(), mount_point.c_str(), entry.fs_type.c_str(), MS_REMOUNT,
|
||||||
nullptr) == 0) {
|
nullptr) == 0) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue