From 63b306162808b7ed467d67d9997f210430deaf07 Mon Sep 17 00:00:00 2001 From: niruiyu Date: Thu, 2 Jun 2011 01:48:33 +0000 Subject: 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 --- .../Library/GenericBdsLib/BdsConsole.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'IntelFrameworkModulePkg') 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.
+Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.
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) { -- cgit v1.2.3