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
diff --git a/common/fake_boot_control.h b/common/fake_boot_control.h
index bd9d9ca..adbacd6 100644
--- a/common/fake_boot_control.h
+++ b/common/fake_boot_control.h
@@ -48,7 +48,9 @@
bool GetPartitionDevice(const std::string& partition_name,
BootControlInterface::Slot slot,
- std::string* device) const override {
+ bool not_in_payload,
+ std::string* device,
+ bool* is_dynamic) const override {
if (slot >= num_slots_)
return false;
auto part_it = devices_[slot].find(partition_name);
@@ -58,6 +60,12 @@
return true;
}
+ bool GetPartitionDevice(const std::string& partition_name,
+ BootControlInterface::Slot slot,
+ std::string* device) const override {
+ return GetPartitionDevice(partition_name, slot, false, device, nullptr);
+ }
+
bool IsSlotBootable(BootControlInterface::Slot slot) const override {
return slot < num_slots_ && is_bootable_[slot];
}