diff options
author | Scott Lobdell <slobdell@google.com> | 2021-04-25 19:53:10 +0000 |
---|---|---|
committer | Scott Lobdell <slobdell@google.com> | 2021-04-25 19:53:10 +0000 |
commit | d650df1d306a5a828e7b13a8cc954196fea44992 (patch) | |
tree | 8a0c2de54ad2c65b6a60c9a4b7d8cfd6450d2a46 /aosp/dynamic_partition_control_android.h | |
parent | fd0dc2f4c2853630fff9470cb3cdd7faa931ac67 (diff) | |
parent | e9e9456d350042d32e00b61312483b96a05e0762 (diff) |
Merge SP1A.210425.001
Change-Id: I1ffc4b02d58cb0eef9cb21589ec84f35c41e430c
Diffstat (limited to 'aosp/dynamic_partition_control_android.h')
-rw-r--r-- | aosp/dynamic_partition_control_android.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/aosp/dynamic_partition_control_android.h b/aosp/dynamic_partition_control_android.h index b7aa7eaa..df914018 100644 --- a/aosp/dynamic_partition_control_android.h +++ b/aosp/dynamic_partition_control_android.h @@ -258,6 +258,18 @@ class DynamicPartitionControlAndroid : public DynamicPartitionControlInterface { const DeltaArchiveManifest& manifest, uint64_t* required_size); + enum SpaceLimit { + // Most restricted: if sum(groups) > super / 2, error + ERROR_IF_EXCEEDED_HALF_OF_SUPER, + // Implies ERROR_IF_EXCEEDED_SUPER; then, if sum(groups) > super / 2, warn + WARN_IF_EXCEEDED_HALF_OF_SUPER, + // Least restricted: if sum(groups) > super, error + ERROR_IF_EXCEEDED_SUPER, + }; + // Helper of CheckSuperPartitionAllocatableSpace. Determine limit for groups + // and partitions. + SpaceLimit GetSpaceLimit(bool use_snapshot); + // Returns true if the allocatable space in super partition is larger than // the size of dynamic partition groups in the manifest. bool CheckSuperPartitionAllocatableSpace( |