summaryrefslogtreecommitdiff
path: root/common/dynamic_partition_control_interface.h
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2021-04-06 20:18:46 -0700
committerLinux Build Service Account <lnxbuild@localhost>2021-04-06 20:18:46 -0700
commita1531c020edb7ad659164d6be96378fad956b61b (patch)
tree693ff7c1d724992a2adee4d85de4790ecef1f97e /common/dynamic_partition_control_interface.h
parentc9a4a18fa045995e38ff920916f3be1bcf13239b (diff)
parent9c7061227a48006b715abc21030bf7cd3038e656 (diff)
Merge 9c7061227a48006b715abc21030bf7cd3038e656 on remote branch
Change-Id: I715fc97656b8cd7eeee81645a298e785ae38e72f
Diffstat (limited to 'common/dynamic_partition_control_interface.h')
-rw-r--r--common/dynamic_partition_control_interface.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/common/dynamic_partition_control_interface.h b/common/dynamic_partition_control_interface.h
index 4f46f740..8b29c3b0 100644
--- a/common/dynamic_partition_control_interface.h
+++ b/common/dynamic_partition_control_interface.h
@@ -69,6 +69,9 @@ class DynamicPartitionControlInterface {
// Return the feature flags of Virtual A/B on this device.
virtual FeatureFlag GetVirtualAbFeatureFlag() = 0;
// Return the feature flags of Virtual A/B Compression on this device.
+ // This function will tell you if current device supports VABC. However, it
+ // DOES NOT tell you if VABC is used for current OTA update. For that, use
+ // UpdateUsesSnapshotCompression.
virtual FeatureFlag GetVirtualAbCompressionFeatureFlag() = 0;
// Attempt to optimize |operation|.
@@ -134,11 +137,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.
@@ -171,6 +176,16 @@ class DynamicPartitionControlInterface {
virtual bool MapAllPartitions() = 0;
// Unmap virtual block devices for all partitions.
virtual bool UnmapAllPartitions() = 0;
+
+ // Return if snapshot compression is enabled for this update.
+ // This function should only be called after preparing for an update
+ // (PreparePartitionsForUpdate), and before merging
+ // (see GetCleanupPreviousUpdateAction and CleanupPreviousUpdateAction) or
+ // resetting it (ResetUpdate).
+ //
+ // To know if the device supports snapshot compression by itself, use
+ // GetVirtualAbCompressionFeatureFlag
+ virtual bool UpdateUsesSnapshotCompression() = 0;
};
} // namespace chromeos_update_engine