system/core
Revisão | 2b8e96bd64ac901905b3bb96e255c68664f3d7bc (tree) |
---|---|
Hora | 2019-04-03 06:54:34 |
Autor | Treehugger Robot <treehugger-gerrit@goog...> |
Commiter | Gerrit Code Review |
Merge "fs_mgr: remount: system is root"
@@ -340,6 +340,7 @@ int main(int argc, char* argv[]) { | ||
340 | 340 | blk_device = rentry.blk_device; |
341 | 341 | break; |
342 | 342 | } |
343 | + // Find overlayfs mount point? | |
343 | 344 | if ((mount_point == "/") && (rentry.mount_point == "/system")) { |
344 | 345 | blk_device = rentry.blk_device; |
345 | 346 | mount_point = "/system"; |
@@ -352,6 +353,12 @@ int main(int argc, char* argv[]) { | ||
352 | 353 | } |
353 | 354 | fs_mgr_set_blk_ro(blk_device, false); |
354 | 355 | |
356 | + // Find system-as-root mount point? | |
357 | + if ((mount_point == "/system") && !GetEntryForMountPoint(&mounts, mount_point) && | |
358 | + GetEntryForMountPoint(&mounts, "/")) { | |
359 | + mount_point = "/"; | |
360 | + } | |
361 | + | |
355 | 362 | // Now remount! |
356 | 363 | if (::mount(blk_device.c_str(), mount_point.c_str(), entry.fs_type.c_str(), MS_REMOUNT, |
357 | 364 | nullptr) == 0) { |