diff options
author | Yifan Hong <elsk@google.com> | 2019-09-16 13:18:22 -0700 |
---|---|---|
committer | Yifan Hong <elsk@google.com> | 2019-09-23 19:38:27 -0700 |
commit | 13d41cb2accc1e2e1271b22a53f0dce6db0493f5 (patch) | |
tree | a3f1a02ee80743e96abdd8be437411402b02b16d /dynamic_partition_control_interface.h | |
parent | 87ea73fe5a48c54ad56ba769375d180d1ce5c614 (diff) |
[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
Diffstat (limited to 'dynamic_partition_control_interface.h')
-rw-r--r-- | dynamic_partition_control_interface.h | 5 |
1 files changed, 3 insertions, 2 deletions
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 <liblp/builder.h> #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<android::fs_mgr::MetadataBuilder> 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; |