Skip to content

Commit

Permalink
partitionmanager: don't treat non-existing logical partitions
Browse files Browse the repository at this point in the history
 * As per google no. logical partitions can be increased or decreased.

 * eg. some devices updated to vendor_dlkm or odm_dlkm but their stock doesn't.

 * Fixes:
   No more error on device with vendor_dlkm in recovery fstab
   Mounting in custom OS.

Change-Id: Ibb5019808ef4f69ff421b57aaeb24d91b8d34cef
Signed-off-by: Mohd Faraz <[email protected]>
  • Loading branch information
AndroiableDroid committed Jan 3, 2023
1 parent 092e803 commit d3e575c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion partitionmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,8 @@ void TWPartitionManager::Setup_Fstab_Partitions(bool Display_Error) {
else
(*iter)->Has_Android_Secure = false;

if ((*iter)->Is_Super) Prepare_Super_Volume((*iter));
if ((*iter)->Is_Super && !Prepare_Super_Volume(*iter))
Partitions.erase(iter--);
}

Unlock_Block_Partitions();
Expand Down Expand Up @@ -4089,6 +4090,7 @@ bool TWPartitionManager::Prepare_All_Super_Volumes() {
if ((*iter)->Is_Super) {
if (!Prepare_Super_Volume(*iter)) {
status = false;
Partitions.erase(iter--);
}
PartitionManager.Output_Partition(*iter);
}
Expand Down

0 comments on commit d3e575c

Please sign in to comment.