commit | 0039372d755ae585aa2c97abdf95c410e5d78dff | [log] [tgz] |
---|---|---|
author | David Anderson <dvander@google.com> | Wed Mar 10 02:50:46 2021 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Wed Mar 10 02:50:46 2021 +0000 |
tree | 7cb21e4b5dbb81c72662b47136b75315fe1d2f07 | |
parent | 9d1c51e98307f0c79a7afda9e3cbee5cfebc8c08 [diff] | |
parent | 7407e55c61333a68b0a5226e69b9b5bb59551a5f [diff] |
Verify that dynamic partitions have a usable size after resizing. am: 0e1c7fd272 am: 7407e55c61 Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/1622586 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I34f0bcd702e438851276d452d5d69bf0cb9a1c8a
diff --git a/aosp/dynamic_partition_control_android.cc b/aosp/dynamic_partition_control_android.cc index 62da659..6bf896c 100644 --- a/aosp/dynamic_partition_control_android.cc +++ b/aosp/dynamic_partition_control_android.cc
@@ -939,6 +939,12 @@ << " to size " << partition_size << ". Not enough space?"; return false; } + if (p->size() < partition_size) { + LOG(ERROR) << "Partition " << partition_name_suffix + << " was expected to have size " << partition_size + << ", but instead has size " << p->size(); + return false; + } LOG(INFO) << "Added partition " << partition_name_suffix << " to group " << group_name_suffix << " with size " << partition_size; }