system/core
Révision | a8611c0982c498a927b901fa7715fedd76f8d974 (tree) |
---|---|
l'heure | 2019-04-03 07:25:04 |
Auteur | Mark Salyzyn <salyzyn@goog...> |
Commiter | android-build-merger |
Merge "fs_mgr: remount: system is root" am: 2b8e96bd64
am: 81e08d4c98
Change-Id: I31b0c419f36eb1019e8a981bd7a181c765d4a86f
@@ -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) { |