mirror of https://github.com/acidanthera/audk.git
OvmfPkg/PlatformBootManagerLib: eliminate unchecked PcdSetXX() calls
These are deprecated / disabled under the DISABLE_NEW_DEPRECATED_INTERFACES feature test macro. Introduce a variable called PcdStatus, and use it to assert the success of these operations (there is no reason for them to fail here). Cc: Anthony PERARD <anthony.perard@citrix.com> Cc: Gary Lin <glin@suse.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=166 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Gary Lin <glin@suse.com> Tested-by: Gary Lin <glin@suse.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
This commit is contained in:
parent
6348eea63e
commit
579afd6bb8
|
@ -353,8 +353,9 @@ Returns:
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
EFI_HANDLE Handle;
|
EFI_HANDLE Handle;
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
|
RETURN_STATUS PcdStatus;
|
||||||
|
|
||||||
DEBUG ((EFI_D_INFO, "PlatformBootManagerBeforeConsole\n"));
|
DEBUG ((EFI_D_INFO, "PlatformBootManagerBeforeConsole\n"));
|
||||||
InstallDevicePathCallback ();
|
InstallDevicePathCallback ();
|
||||||
|
@ -394,7 +395,9 @@ Returns:
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
|
||||||
PlatformInitializeConsole (gPlatformConsole);
|
PlatformInitializeConsole (gPlatformConsole);
|
||||||
PcdSet16 (PcdPlatformBootTimeOut, GetFrontPageTimeoutFromQemu ());
|
PcdStatus = PcdSet16S (PcdPlatformBootTimeOut,
|
||||||
|
GetFrontPageTimeoutFromQemu ());
|
||||||
|
ASSERT_RETURN_ERROR (PcdStatus);
|
||||||
|
|
||||||
PlatformRegisterOptionsAndKeys ();
|
PlatformRegisterOptionsAndKeys ();
|
||||||
}
|
}
|
||||||
|
@ -1281,6 +1284,7 @@ VisitingFileSystemInstance (
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
STATIC BOOLEAN ConnectedToFileSystem = FALSE;
|
STATIC BOOLEAN ConnectedToFileSystem = FALSE;
|
||||||
|
RETURN_STATUS PcdStatus;
|
||||||
|
|
||||||
if (ConnectedToFileSystem) {
|
if (ConnectedToFileSystem) {
|
||||||
return EFI_ALREADY_STARTED;
|
return EFI_ALREADY_STARTED;
|
||||||
|
@ -1300,7 +1304,9 @@ VisitingFileSystemInstance (
|
||||||
NULL,
|
NULL,
|
||||||
&mEmuVariableEventReg
|
&mEmuVariableEventReg
|
||||||
);
|
);
|
||||||
PcdSet64 (PcdEmuVariableEvent, (UINT64)(UINTN) mEmuVariableEvent);
|
PcdStatus = PcdSet64S (PcdEmuVariableEvent,
|
||||||
|
(UINT64)(UINTN) mEmuVariableEvent);
|
||||||
|
ASSERT_RETURN_ERROR (PcdStatus);
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue