summaryrefslogtreecommitdiff
path: root/common/dynamic_partition_control_interface.h
diff options
context:
space:
mode:
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