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

Commit 8f2745c3 authored by Yifan Hong's avatar Yifan Hong Committed by android-build-merger
Browse files

Merge "updater: Fix build for new CreateLogicalPartition signature." am: 18c3f787 am: 41fd3c3a

am: 0df5805d

Change-Id: Ib90ad40cbe99ebe0154ea439e0560d8e5bd109b8
parents 9f1625a1 0df5805d
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@
using android::dm::DeviceMapper;
using android::dm::DmDeviceState;
using android::fs_mgr::CreateLogicalPartition;
using android::fs_mgr::CreateLogicalPartitionParams;
using android::fs_mgr::DestroyLogicalPartition;
using android::fs_mgr::LpMetadata;
using android::fs_mgr::MetadataBuilder;
@@ -64,8 +65,14 @@ bool UpdaterRuntime::MapPartitionOnDeviceMapper(const std::string& partition_nam
                                                std::string* path) {
  auto state = DeviceMapper::Instance().GetState(partition_name);
  if (state == DmDeviceState::INVALID) {
    return CreateLogicalPartition(GetSuperDevice(), 0 /* metadata slot */, partition_name,
                                  true /* force writable */, kMapTimeout, path);
    CreateLogicalPartitionParams params = {
      .block_device = GetSuperDevice(),
      .metadata_slot = 0,
      .partition_name = partition_name,
      .force_writable = true,
      .timeout_ms = kMapTimeout,
    };
    return CreateLogicalPartition(params, path);
  }

  if (state == DmDeviceState::ACTIVE) {