Make "Unmap Super Devices" option available to A-only devices

Change-Id: Ib3aed724b2e98f66387bdca240b0b4f719054594
(cherry picked from commit 2136fc5b91963fc21e782614ce6cfd55ca065eb9)
This commit is contained in:
me-cafebabe
2022-07-20 06:42:18 +08:00
committed by bigbiff
parent 5a0a3aeed5
commit bdb5d2ada5
6 changed files with 9 additions and 7 deletions
+3 -1
View File
@@ -3573,7 +3573,9 @@ bool TWPartitionManager::Unmap_Super_Devices() {
if ((*iter)->Is_Super) {
TWPartition *part = *iter;
std::string bare_partition_name = Get_Bare_Partition_Name((*iter)->Get_Mount_Point());
std::string blk_device_partition = bare_partition_name + PartitionManager.Get_Active_Slot_Suffix();
std::string blk_device_partition = bare_partition_name;
if (DataManager::GetStrValue(TW_VIRTUAL_AB_ENABLED) == "1")
blk_device_partition.append(PartitionManager.Get_Active_Slot_Suffix());
(*iter)->UnMount(false);
LOGINFO("removing dynamic partition: %s\n", blk_device_partition.c_str());
destroyed = DestroyLogicalPartition(blk_device_partition);