mirror of
https://github.com/LongSoft/UEFITool.git
synced 2024-11-21 23:48:22 +08:00
Fallback to RawArea parsing in case IntelDescriptor or Capsule parsing was unsuccesful
This commit is contained in:
parent
6f9dc0ab88
commit
2d1ebcc11b
@ -110,18 +110,14 @@ USTATUS FfsParser::performFirstPass(const UByteArray & buffer, UModelIndex & ind
|
|||||||
return U_INVALID_PARAMETER;
|
return U_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
USTATUS result;
|
|
||||||
|
|
||||||
// Try parsing as UEFI Capsule
|
// Try parsing as UEFI Capsule
|
||||||
result = parseCapsule(buffer, 0, UModelIndex(), index);;
|
if (U_SUCCESS == parseCapsule(buffer, 0, UModelIndex(), index)) {
|
||||||
if (result != U_ITEM_NOT_FOUND) {
|
return U_SUCCESS;
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Try parsing as Intel image
|
// Try parsing as Intel image
|
||||||
result = parseIntelImage(buffer, 0, UModelIndex(), index);
|
if (U_SUCCESS == parseIntelImage(buffer, 0, UModelIndex(), index)) {
|
||||||
if (result != U_ITEM_NOT_FOUND) {
|
return U_SUCCESS;
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Parse as generic image
|
// Parse as generic image
|
||||||
@ -274,9 +270,8 @@ USTATUS FfsParser::parseCapsule(const UByteArray & capsule, const UINT32 localOf
|
|||||||
UModelIndex imageIndex;
|
UModelIndex imageIndex;
|
||||||
|
|
||||||
// Try parsing as Intel image
|
// Try parsing as Intel image
|
||||||
USTATUS result = parseIntelImage(image, capsuleHeaderSize, index, imageIndex);
|
if (U_SUCCESS == parseIntelImage(image, capsuleHeaderSize, index, imageIndex)) {
|
||||||
if (result != U_ITEM_NOT_FOUND) {
|
return U_SUCCESS;
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Parse as generic image
|
// Parse as generic image
|
||||||
|
Loading…
Reference in New Issue
Block a user