Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit efba73d9 authored by David Anderson's avatar David Anderson Committed by Automerger Merge Worker
Browse files

Merge "fs_mgr: Fix __ANDROID_RECOVERY__ usage in libfiemap." am: 7a5379d0 am: d635f15d

Original change: https://android-review.googlesource.com/c/platform/system/core/+/1978057

Change-Id: I9633f2280c3ba9449a5c943bc53dcab5655faac2
parents 716a79e9 d635f15d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -79,7 +79,7 @@ ImageManager::ImageManager(const std::string& metadata_dir, const std::string& d
    partition_opener_ = std::make_unique<android::fs_mgr::PartitionOpener>();

    // Allow overriding whether ImageManager thinks it's in recovery, for testing.
#ifdef __ANDROID_RECOVERY__
#ifdef __ANDROID_RAMDISK__
    device_info_.is_recovery = {true};
#else
    if (!device_info_.is_recovery.has_value()) {
@@ -523,7 +523,7 @@ bool ImageManager::MapImageDevice(const std::string& name,

    auto image_header = GetImageHeaderPath(name);

#if !defined __ANDROID_RECOVERY__
#ifndef __ANDROID_RAMDISK__
    // If there is a device-mapper node wrapping the block device, then we're
    // able to create another node around it; the dm layer does not carry the
    // exclusion lock down the stack when a mount occurs.