X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=IntelFrameworkModulePkg%2FLibrary%2FGenericBdsLib%2FBdsMisc.c;h=66b9d2bb2d9574a7d42e7b22b48bf13e836b9694;hb=7490e2bed8141f4edce22a4facf5cba4e2f93129;hp=acf61ebcb6627a371ee3d466a7bd06fb0ad83743;hpb=5c08e1173703234cc2913757f237ee916087498a;p=mirror_edk2.git diff --git a/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsMisc.c b/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsMisc.c index acf61ebcb6..66b9d2bb2d 100644 --- a/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsMisc.c +++ b/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsMisc.c @@ -1,7 +1,7 @@ /** @file Misc BDS library function -Copyright (c) 2004 - 2008, Intel Corporation.
+Copyright (c) 2004 - 2010, 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 @@ -22,42 +22,6 @@ BOOLEAN mResetRequired = FALSE; extern UINT16 gPlatformBootTimeOutDefault; - -/** - Return the default value for system Timeout variable. - - @return Timeout value. - -**/ -UINT16 -EFIAPI -BdsLibGetTimeout ( - VOID - ) -{ - UINT16 Timeout; - UINTN Size; - EFI_STATUS Status; - - // - // Return Timeout variable or 0xffff if no valid - // Timeout variable exists. - // - Size = sizeof (UINT16); - Status = gRT->GetVariable (L"Timeout", &gEfiGlobalVariableGuid, NULL, &Size, &Timeout); - if (EFI_ERROR (Status)) { - // - // According to UEFI 2.0 spec, it should treat the Timeout value as 0xffff - // (default value PcdPlatformBootTimeOutDefault) when L"Timeout" variable is not present. - // To make the current EFI Automatic-Test activity possible, platform can choose other value - // for automatic boot when the variable is not present. - // - Timeout = PcdGet16 (PcdPlatformBootTimeOutDefault); - } - - return Timeout; -} - /** The function will go through the driver option link list, load and start every driver the driver option device path point to. @@ -608,9 +572,9 @@ BdsLibBuildOptionFromVar ( } Option = BdsLibVariableToOption (BdsCommonOptionList, OptionName); - ASSERT (Option != NULL); - Option->BootCurrent = OptionOrder[Index]; - + if (Option != NULL) { + Option->BootCurrent = OptionOrder[Index]; + } } FreePool (OptionOrder); @@ -831,7 +795,7 @@ BdsLibOutputStrings ( // If String is NULL, then it's the end of the list // String = VA_ARG (Args, CHAR16 *); - if (String != NULL) { + if (String == NULL) { break; } @@ -847,7 +811,7 @@ BdsLibOutputStrings ( } // -// Following are BDS Lib functions which contain all the code about setup browser reset reminder feature. +// Following are BDS Lib functions which contain all the code about setup browser reset reminder feature. // Setup Browser reset reminder feature is that an reset reminder will be given before user leaves the setup browser if // user change any option setting which needs a reset to be effective, and the reset will be applied according to the user selection. // @@ -974,7 +938,7 @@ SetupResetReminder ( // Popup a menu to notice user // do { - IfrLibCreatePopUp (2, &Key, StringBuffer1, StringBuffer2); + CreatePopUp (EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE, &Key, StringBuffer1, StringBuffer2, NULL); } while ((Key.ScanCode != SCAN_ESC) && (Key.UnicodeChar != CHAR_CARRIAGE_RETURN)); FreePool (StringBuffer1); @@ -1042,11 +1006,12 @@ BdsLibGetImageHeader ( Root = NULL; goto Done; } - + ASSERT (Root != NULL); Status = Root->Open (Root, &ThisFile, FileName, EFI_FILE_MODE_READ, 0); if (EFI_ERROR (Status)) { goto Done; } + ASSERT (ThisFile != NULL); // // Get file size