mirror of https://github.com/acidanthera/audk.git
Add return status check for SetVariable.
Signed-off-by: niruiyu Reviewed-by: jljusten Reviewed-by: hhtian git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11722 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
ae127ef0c3
commit
63b3061628
|
@ -1,7 +1,7 @@
|
||||||
/** @file
|
/** @file
|
||||||
BDS Lib functions which contain all the code to connect console device
|
BDS Lib functions which contain all the code to connect console device
|
||||||
|
|
||||||
Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
@ -196,6 +196,7 @@ BdsLibUpdateConsoleVariable (
|
||||||
IN EFI_DEVICE_PATH_PROTOCOL *ExclusiveDevicePath
|
IN EFI_DEVICE_PATH_PROTOCOL *ExclusiveDevicePath
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
EFI_STATUS Status;
|
||||||
EFI_DEVICE_PATH_PROTOCOL *VarConsole;
|
EFI_DEVICE_PATH_PROTOCOL *VarConsole;
|
||||||
UINTN DevicePathSize;
|
UINTN DevicePathSize;
|
||||||
EFI_DEVICE_PATH_PROTOCOL *NewDevicePath;
|
EFI_DEVICE_PATH_PROTOCOL *NewDevicePath;
|
||||||
|
@ -272,13 +273,14 @@ BdsLibUpdateConsoleVariable (
|
||||||
//
|
//
|
||||||
// Finally, Update the variable of the default console by NewDevicePath
|
// Finally, Update the variable of the default console by NewDevicePath
|
||||||
//
|
//
|
||||||
gRT->SetVariable (
|
Status = gRT->SetVariable (
|
||||||
ConVarName,
|
ConVarName,
|
||||||
&gEfiGlobalVariableGuid,
|
&gEfiGlobalVariableGuid,
|
||||||
Attributes,
|
Attributes,
|
||||||
GetDevicePathSize (NewDevicePath),
|
GetDevicePathSize (NewDevicePath),
|
||||||
NewDevicePath
|
NewDevicePath
|
||||||
);
|
);
|
||||||
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
|
||||||
if (VarConsole == NewDevicePath) {
|
if (VarConsole == NewDevicePath) {
|
||||||
if (VarConsole != NULL) {
|
if (VarConsole != NULL) {
|
||||||
|
|
Loading…
Reference in New Issue