From 13d41cb2accc1e2e1271b22a53f0dce6db0493f5 Mon Sep 17 00:00:00 2001 From: Yifan Hong Date: Mon, 16 Sep 2019 13:18:22 -0700 Subject: [REFACTOR] Pass DeltaArchiveManifest to DynamicPartitionControl DynamicPartitionControl need the list of operations to calculate COW sizes. - Remove BootControlInterface::PartitionMetadata. Replace all references with DeltaArchiveManifest. DeltaArchiveManifest has all information that PartitionMetadata has. - Rename all InitPartitionMetadata to PreparePartitionsForUpdate - Change all PreparePartitionsForUpdate to use new signature Bug: 138816109 Test: update_enigne_unittests --gtest_filter=*BootControl*:*Dynamic* Change-Id: I4389ba2b1801addf8c3bc8395e2ea6a9a3ed27a0 --- dynamic_partition_control_interface.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'dynamic_partition_control_interface.h') diff --git a/dynamic_partition_control_interface.h b/dynamic_partition_control_interface.h index 9c7b8d07..a4dc5765 100644 --- a/dynamic_partition_control_interface.h +++ b/dynamic_partition_control_interface.h @@ -27,6 +27,7 @@ #include #include "update_engine/common/boot_control_interface.h" +#include "update_engine/update_metadata.pb.h" namespace chromeos_update_engine { @@ -88,13 +89,13 @@ class DynamicPartitionControlInterface { virtual std::unique_ptr LoadMetadataBuilder( const std::string& super_device, uint32_t source_slot) = 0; - // Prepare all partitions for an update specified in |partition_metadata|. + // Prepare all partitions for an update specified in |manifest|. // This is needed before calling MapPartitionOnDeviceMapper(), otherwise the // device would be mapped in an inconsistent way. virtual bool PreparePartitionsForUpdate( uint32_t source_slot, uint32_t target_slot, - const BootControlInterface::PartitionMetadata& partition_metadata) = 0; + const DeltaArchiveManifest& manifest) = 0; // Return a possible location for devices listed by name. virtual bool GetDeviceDir(std::string* path) = 0; -- cgit v1.2.3