summaryrefslogtreecommitdiff
path: root/common/dynamic_partition_control_interface.h
diff options
context:
space:
mode:
authorTianjie <xunchang@google.com>2021-02-13 16:02:22 -0800
committerTianjie Xu <xunchang@google.com>2021-02-16 18:08:19 +0000
commit3a55fc2e5f2635a1aea5695359445d8117545d57 (patch)
tree58fae0787d23c342d3cbc490c4ee7e73702ab501 /common/dynamic_partition_control_interface.h
parent9b85a6c202c35fe200994d50d6750cb42e5347a6 (diff)
Don't list dynamic if a slot doesn't support DAP
If a slot doesn't support dynamic partitions, it's impossible to list dynamic partitions on that slot. And we should just fall back to the regular A/B in this case. Bug: 180025432 Test: apply a retrofit package Change-Id: I16c457b591e8c1d0cf1077a7be50dd9d8f61b8eb
Diffstat (limited to 'common/dynamic_partition_control_interface.h')
-rw-r--r--common/dynamic_partition_control_interface.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/common/dynamic_partition_control_interface.h b/common/dynamic_partition_control_interface.h
index 8368eeb0..61127d4e 100644
--- a/common/dynamic_partition_control_interface.h
+++ b/common/dynamic_partition_control_interface.h
@@ -134,11 +134,13 @@ class DynamicPartitionControlInterface {
// allocated space for snapshot updates.
virtual bool ResetUpdate(PrefsInterface* prefs) = 0;
- // Reads the dynamic partitions metadata from the current slot, and puts the
+ // Reads the dynamic partitions metadata from the given slot, and puts the
// name of the dynamic partitions with the current suffix to |partitions|.
// Returns true on success.
virtual bool ListDynamicPartitionsForSlot(
- uint32_t current_slot, std::vector<std::string>* partitions) = 0;
+ uint32_t slot,
+ uint32_t current_slot,
+ std::vector<std::string>* partitions) = 0;
// Finds a possible location that list all block devices by name; and puts
// the result in |path|. Returns true on success.