diff options
| author | Yifan Hong <elsk@google.com> | 2020-05-14 19:17:20 +0000 |
|---|---|---|
| committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-05-14 19:17:20 +0000 |
| commit | c32bc3f2a1b7a40fd8f38d49c1bbfbb545676900 (patch) | |
| tree | 127383ad3b8153f281714d3bc2f92f6ce8221995 | |
| parent | c84f860f919ed55eebec565418ef5766afdfe2fa (diff) | |
| parent | 887305edfb7ae4700db9e17993253b41cef9ff2c (diff) | |
Merge "Do not erase system_other if zero length." into rvc-dev am: 46aa61ec59 am: 887305edfb
Change-Id: Ia5817b3a2aedb949e61da715671c4d20c7a6e700
| -rw-r--r-- | dynamic_partition_control_android.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/dynamic_partition_control_android.cc b/dynamic_partition_control_android.cc index 48ad5f03..5ed604ab 100644 --- a/dynamic_partition_control_android.cc +++ b/dynamic_partition_control_android.cc @@ -647,6 +647,13 @@ bool DynamicPartitionControlAndroid::GetSystemOtherPath( return true; } + if (p->size() < AVB_FOOTER_SIZE) { + LOG(INFO) << partition_name_suffix << " has length " << p->size() + << "( < AVB_FOOTER_SIZE " << AVB_FOOTER_SIZE + << "), skip erasing."; + return true; + } + // Delete any pre-existing device with name |partition_name_suffix| and // also remove it from |mapped_devices_|. // In recovery, metadata might not be mounted, and |
