diff options
author | niruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-06-02 01:48:33 +0000 |
---|---|---|
committer | niruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-06-02 01:48:33 +0000 |
commit | 63b306162808b7ed467d67d9997f210430deaf07 (patch) | |
tree | 68c2174cd61e09ea0edf45c6915a42ba86185098 /IntelFrameworkModulePkg/Library/GenericBdsLib | |
parent | ae127ef0c39944ac04a5b210bdc0e693e485fa34 (diff) | |
download | edk2-platforms-63b306162808b7ed467d67d9997f210430deaf07.tar.xz |
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
Diffstat (limited to 'IntelFrameworkModulePkg/Library/GenericBdsLib')
-rw-r--r-- | IntelFrameworkModulePkg/Library/GenericBdsLib/BdsConsole.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsConsole.c b/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsConsole.c index 5a0f79bf75..2add59c5ab 100644 --- a/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsConsole.c +++ b/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsConsole.c @@ -1,7 +1,7 @@ /** @file
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
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
@@ -196,6 +196,7 @@ BdsLibUpdateConsoleVariable ( IN EFI_DEVICE_PATH_PROTOCOL *ExclusiveDevicePath
)
{
+ EFI_STATUS Status;
EFI_DEVICE_PATH_PROTOCOL *VarConsole;
UINTN DevicePathSize;
EFI_DEVICE_PATH_PROTOCOL *NewDevicePath;
@@ -272,13 +273,14 @@ BdsLibUpdateConsoleVariable ( //
// Finally, Update the variable of the default console by NewDevicePath
//
- gRT->SetVariable (
- ConVarName,
- &gEfiGlobalVariableGuid,
- Attributes,
- GetDevicePathSize (NewDevicePath),
- NewDevicePath
- );
+ Status = gRT->SetVariable (
+ ConVarName,
+ &gEfiGlobalVariableGuid,
+ Attributes,
+ GetDevicePathSize (NewDevicePath),
+ NewDevicePath
+ );
+ ASSERT_EFI_ERROR (Status);
if (VarConsole == NewDevicePath) {
if (VarConsole != NULL) {
|