summaryrefslogtreecommitdiffstats
path: root/fsck_unshare_blocks.cpp
diff options
context:
space:
mode:
authorJiyong Park <jiyong@google.com>2018-06-01 04:58:54 +0200
committerJiyong Park <jiyong@google.com>2018-06-07 16:24:33 +0200
commit8b7af4c0ee245c913ae00dbf052c85156fb1b68e (patch)
treef6de65c81ca137588032ddd9c86596d9bcaafeb7 /fsck_unshare_blocks.cpp
parentMerge "updater_sample: Add suspend/resume update" (diff)
downloadandroid_bootable_recovery-8b7af4c0ee245c913ae00dbf052c85156fb1b68e.tar
android_bootable_recovery-8b7af4c0ee245c913ae00dbf052c85156fb1b68e.tar.gz
android_bootable_recovery-8b7af4c0ee245c913ae00dbf052c85156fb1b68e.tar.bz2
android_bootable_recovery-8b7af4c0ee245c913ae00dbf052c85156fb1b68e.tar.lz
android_bootable_recovery-8b7af4c0ee245c913ae00dbf052c85156fb1b68e.tar.xz
android_bootable_recovery-8b7af4c0ee245c913ae00dbf052c85156fb1b68e.tar.zst
android_bootable_recovery-8b7af4c0ee245c913ae00dbf052c85156fb1b68e.zip
Diffstat (limited to 'fsck_unshare_blocks.cpp')
-rw-r--r--fsck_unshare_blocks.cpp14
1 files changed, 3 insertions, 11 deletions
diff --git a/fsck_unshare_blocks.cpp b/fsck_unshare_blocks.cpp
index a100368e7..2e6b5b807 100644
--- a/fsck_unshare_blocks.cpp
+++ b/fsck_unshare_blocks.cpp
@@ -115,14 +115,6 @@ static bool run_e2fsck(const std::string& partition) {
return true;
}
-static const char* get_system_root() {
- if (android::base::GetBoolProperty("ro.build.system_root_image", false)) {
- return "/system_root";
- } else {
- return "/system";
- }
-}
-
bool do_fsck_unshare_blocks() {
// List of partitions we will try to e2fsck -E unshare_blocks.
std::vector<std::string> partitions = { "/odm", "/oem", "/product", "/vendor" };
@@ -130,10 +122,10 @@ bool do_fsck_unshare_blocks() {
// Temporarily mount system so we can copy e2fsck_static.
bool mounted = false;
if (android::base::GetBoolProperty("ro.build.system_root_image", false)) {
- mounted = ensure_path_mounted_at("/", "/system_root") != -1;
+ mounted = ensure_path_mounted_at("/", "/mnt/system") != -1;
partitions.push_back("/");
} else {
- mounted = ensure_path_mounted("/system") != -1;
+ mounted = ensure_path_mounted_at("/system", "/mnt/system") != -1;
partitions.push_back("/system");
}
if (!mounted) {
@@ -144,7 +136,7 @@ bool do_fsck_unshare_blocks() {
LOG(ERROR) << "Could not copy e2fsck to /tmp.";
return false;
}
- if (umount(get_system_root()) < 0) {
+ if (umount("/mnt/system") < 0) {
PLOG(ERROR) << "umount failed";
return false;
}