Merge "avb: Read partition instead of label instead of GUID"
diff --git a/QcomModulePkg/Library/FastbootLib/FastbootCmds.c b/QcomModulePkg/Library/FastbootLib/FastbootCmds.c
old mode 100644
new mode 100755
index e02cf35..b057b21
--- a/QcomModulePkg/Library/FastbootLib/FastbootCmds.c
+++ b/QcomModulePkg/Library/FastbootLib/FastbootCmds.c
@@ -1896,15 +1896,18 @@
if (!EFI_ERROR (Status)) {
FastbootOkay ("");
- goto out;
}
}
- FlashResult = HandleSparseImgFlash (PartitionName,
- ARRAY_SIZE (PartitionName),
- mFlashDataBuffer, mFlashNumDataBytes);
- IsFlashComplete = TRUE;
- StopUsbTimer ();
+ if (EFI_ERROR (Status) ||
+ !IsUseMThreadParallel () ||
+ (PartitionSize <= MaxDownLoadSize)) {
+ FlashResult = HandleSparseImgFlash (PartitionName,
+ ARRAY_SIZE (PartitionName),
+ mFlashDataBuffer, mFlashNumDataBytes);
+ IsFlashComplete = TRUE;
+ StopUsbTimer ();
+ }
} else if (!AsciiStrnCmp (UbiHeader->HdrMagic, UBI_HEADER_MAGIC, 4)) {
FlashResult = HandleUbiImgFlash (PartitionName,
ARRAY_SIZE (PartitionName),