Add conditional check before output status code.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7603 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -48,6 +48,9 @@ InternalReportStatusCode (
|
|||||||
IN EFI_STATUS_CODE_DATA *Data OPTIONAL
|
IN EFI_STATUS_CODE_DATA *Data OPTIONAL
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
if ((ReportProgressCodeEnabled() && ((Type) & EFI_STATUS_CODE_TYPE_MASK) == EFI_PROGRESS_CODE) ||
|
||||||
|
(ReportErrorCodeEnabled() && ((Type) & EFI_STATUS_CODE_TYPE_MASK) == EFI_ERROR_CODE) ||
|
||||||
|
(ReportDebugCodeEnabled() && ((Type) & EFI_STATUS_CODE_TYPE_MASK) == EFI_DEBUG_CODE)) {
|
||||||
//
|
//
|
||||||
// If gStatusCode is NULL, then see if a Status Code Protocol instance is present
|
// If gStatusCode is NULL, then see if a Status Code Protocol instance is present
|
||||||
// in the handle database.
|
// in the handle database.
|
||||||
@ -64,6 +67,9 @@ InternalReportStatusCode (
|
|||||||
// parameters to the ReportStatusCode() service of the Status Code Protocol
|
// parameters to the ReportStatusCode() service of the Status Code Protocol
|
||||||
//
|
//
|
||||||
return (*mReportStatusCode) (Type, Value, Instance, (EFI_GUID *)CallerId, Data);
|
return (*mReportStatusCode) (Type, Value, Instance, (EFI_GUID *)CallerId, Data);
|
||||||
|
}
|
||||||
|
|
||||||
|
return EFI_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -67,6 +67,9 @@ InternalReportStatusCode (
|
|||||||
CONST EFI_PEI_SERVICES **PeiServices;
|
CONST EFI_PEI_SERVICES **PeiServices;
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
|
|
||||||
|
if ((ReportProgressCodeEnabled() && ((Type) & EFI_STATUS_CODE_TYPE_MASK) == EFI_PROGRESS_CODE) ||
|
||||||
|
(ReportErrorCodeEnabled() && ((Type) & EFI_STATUS_CODE_TYPE_MASK) == EFI_ERROR_CODE) ||
|
||||||
|
(ReportDebugCodeEnabled() && ((Type) & EFI_STATUS_CODE_TYPE_MASK) == EFI_DEBUG_CODE)) {
|
||||||
PeiServices = GetPeiServicesTablePointer ();
|
PeiServices = GetPeiServicesTablePointer ();
|
||||||
Status = (*PeiServices)->ReportStatusCode (
|
Status = (*PeiServices)->ReportStatusCode (
|
||||||
PeiServices,
|
PeiServices,
|
||||||
@ -83,6 +86,9 @@ InternalReportStatusCode (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return Status;
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
return EFI_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user