summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Anderson <dvander@google.com>2019-08-14 21:31:58 +0200
committerDavid Anderson <dvander@google.com>2019-08-14 21:32:55 +0200
commit3cbd7ae6877e6ba8fdba8f66577e68034b78511a (patch)
tree85ef372d1dead92403d0bb295cddf820c24b50c5
parentMerge "Simulator: add the argument to keep the updated images" (diff)
downloadandroid_bootable_recovery-3cbd7ae6877e6ba8fdba8f66577e68034b78511a.tar
android_bootable_recovery-3cbd7ae6877e6ba8fdba8f66577e68034b78511a.tar.gz
android_bootable_recovery-3cbd7ae6877e6ba8fdba8f66577e68034b78511a.tar.bz2
android_bootable_recovery-3cbd7ae6877e6ba8fdba8f66577e68034b78511a.tar.lz
android_bootable_recovery-3cbd7ae6877e6ba8fdba8f66577e68034b78511a.tar.xz
android_bootable_recovery-3cbd7ae6877e6ba8fdba8f66577e68034b78511a.tar.zst
android_bootable_recovery-3cbd7ae6877e6ba8fdba8f66577e68034b78511a.zip
Diffstat (limited to '')
-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) {