summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYifan Hong <elsk@google.com>2019-08-16 20:54:23 +0200
committerandroid-build-merger <android-build-merger@google.com>2019-08-16 20:54:23 +0200
commitfc7e2911e84e1565dd0125080d0885af76f934e8 (patch)
tree8ed2eb5729267882eea208df9db1b47ed0dddf96
parentMerge "Remove common.h" am: 899f7b5105 am: 03fd851f61 am: 9387e5cd61 (diff)
parentMerge "updater: Fix build for new CreateLogicalPartition signature." am: 18c3f78779 am: 41fd3c3ad9 (diff)
downloadandroid_bootable_recovery-fc7e2911e84e1565dd0125080d0885af76f934e8.tar
android_bootable_recovery-fc7e2911e84e1565dd0125080d0885af76f934e8.tar.gz
android_bootable_recovery-fc7e2911e84e1565dd0125080d0885af76f934e8.tar.bz2
android_bootable_recovery-fc7e2911e84e1565dd0125080d0885af76f934e8.tar.lz
android_bootable_recovery-fc7e2911e84e1565dd0125080d0885af76f934e8.tar.xz
android_bootable_recovery-fc7e2911e84e1565dd0125080d0885af76f934e8.tar.zst
android_bootable_recovery-fc7e2911e84e1565dd0125080d0885af76f934e8.zip
-rw-r--r--updater/updater_runtime_dynamic_partitions.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/updater/updater_runtime_dynamic_partitions.cpp b/updater/updater_runtime_dynamic_partitions.cpp
index b084f6592..be9250a81 100644
--- a/updater/updater_runtime_dynamic_partitions.cpp
+++ b/updater/updater_runtime_dynamic_partitions.cpp
@@ -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) {