diff options
author | Tianjie <xunchang@google.com> | 2020-06-03 14:39:32 -0700 |
---|---|---|
committer | Tianjie <xunchang@google.com> | 2020-06-08 19:23:14 -0700 |
commit | 51a5a39c892f11ce30f1c537133432f5e67525e0 (patch) | |
tree | 4fdf95f40f657ff02946c8aa5f124c67a7e0b3b5 /common/boot_control_interface.h | |
parent | 550ade4e44a72708354597307122a3f46e43a7d6 (diff) |
Add an overload function in boot control
It's used to support partial update. The overload function takes
additional info whether the partition is included in payload. And
it also outputs if the partition is a dynamic partition.
Bug: 157778739
Test: unit tests pass
Change-Id: I0741d44c223fb7c187fe208564371acd6d868c65
Diffstat (limited to 'common/boot_control_interface.h')
-rw-r--r-- | common/boot_control_interface.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/common/boot_control_interface.h b/common/boot_control_interface.h index 3906e2f5..c93de5c5 100644 --- a/common/boot_control_interface.h +++ b/common/boot_control_interface.h @@ -59,8 +59,18 @@ class BootControlInterface { // every slot. In order to access the dynamic partitions in the target slot, // GetDynamicPartitionControl()->PreparePartitionsForUpdate() must be called // (with |update| == true for the first time for a payload, and |false| for - // for the rest of the times) prior to calling this function. On success, - // returns true and stores the block device in |device|. + // for the rest of the times) prior to calling this function. + // The handling may be different based on whether the partition is included + // in the update payload. On success, returns true; and stores the block + // device in |device|, if the partition is dynamic in |is_dynamic|. + virtual bool GetPartitionDevice(const std::string& partition_name, + Slot slot, + bool not_in_payload, + std::string* device, + bool* is_dynamic) const = 0; + + // Overload of the above function. We assume the partition is always included + // in the payload. virtual bool GetPartitionDevice(const std::string& partition_name, Slot slot, std::string* device) const = 0; |