ArmPlatformPkg/Bds: Fix loading Timeout from NV storage

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Harry Liebel <Harry.Liebel@arm.com>
Reviewed-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15459 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Harry Liebel 2014-04-11 15:57:06 +00:00 committed by oliviermartin
parent 4c8bb1eb3b
commit 13354807d4
1 changed files with 5 additions and 2 deletions

View File

@ -367,8 +367,11 @@ StartDefaultBootOnTimeout (
Size = sizeof(UINT16);
Timeout = (UINT16)PcdGet16 (PcdPlatformBootTimeOut);
TimeoutPtr = &Timeout;
GetGlobalEnvironmentVariable (L"Timeout", &Timeout, &Size, (VOID**)&TimeoutPtr);
Status = GetGlobalEnvironmentVariable (L"Timeout", &Timeout, &Size, (VOID**)&TimeoutPtr);
if (!EFI_ERROR (Status)) {
Timeout = *TimeoutPtr;
FreePool (TimeoutPtr);
}
if (Timeout != 0xFFFF) {
if (Timeout > 0) {