mirror of https://github.com/acidanthera/audk.git
SignedCapsulePkg SystemFirmwareReportDxe: Try LocateProtocol
Try LocateProtocol after HandleProtocol fails to be compatible with old SystemFirmwareUpdateDxe. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
This commit is contained in:
parent
7343bc8062
commit
fc0494a654
|
@ -201,6 +201,12 @@ FmpSetImage (
|
|||
&gSystemFmpProtocolGuid,
|
||||
(VOID **)&SystemFmp
|
||||
);
|
||||
if (EFI_ERROR(Status)) {
|
||||
Status = gBS->LocateProtocol (
|
||||
&gSystemFmpProtocolGuid,
|
||||
NULL,
|
||||
(VOID **)&SystemFmp
|
||||
);
|
||||
if (EFI_ERROR(Status)) {
|
||||
DEBUG((DEBUG_INFO, "(Agent)SetImage - SystemFmpProtocol - %r\n", Status));
|
||||
SystemFmpPrivate->LastAttempt.LastAttemptStatus = LAST_ATTEMPT_STATUS_ERROR_INVALID_FORMAT;
|
||||
|
@ -214,6 +220,7 @@ FmpSetImage (
|
|||
DEBUG((DEBUG_INFO, "(Agent)SetLastAttemp - %r\n", VarStatus));
|
||||
return Status;
|
||||
}
|
||||
}
|
||||
|
||||
return SystemFmp->SetImage(SystemFmp, ImageIndex, Image, ImageSize, VendorCode, Progress, AbortReason);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue