mirror of https://github.com/acidanthera/audk.git
MdeModulePkg: Replace deprecated function.
Replace GetEfiGlobalVariable with GetEfiGlobalVariable2. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18332 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
44873d3056
commit
cf34f86bc2
|
@ -533,9 +533,9 @@ LocateSerialIo (
|
|||
//
|
||||
// Get L"ConOut", L"ConIn" and L"ErrOut" from the Var
|
||||
//
|
||||
OutDevicePath = GetEfiGlobalVariable (L"ConOut");
|
||||
InpDevicePath = GetEfiGlobalVariable (L"ConIn");
|
||||
ErrDevicePath = GetEfiGlobalVariable (L"ErrOut");
|
||||
GetEfiGlobalVariable2 (L"ConOut", (VOID**)&OutDevicePath, NULL);
|
||||
GetEfiGlobalVariable2 (L"ConIn", (VOID**)&InpDevicePath, NULL);
|
||||
GetEfiGlobalVariable2 (L"ErrOut", (VOID**)&ErrDevicePath, NULL);
|
||||
if (OutDevicePath != NULL) {
|
||||
UpdateComAttributeFromVariable (OutDevicePath);
|
||||
}
|
||||
|
@ -756,20 +756,20 @@ GetConsoleMenu (
|
|||
switch (ConsoleMenuType) {
|
||||
case BM_CONSOLE_IN_CONTEXT_SELECT:
|
||||
ConsoleMenu = &ConsoleInpMenu;
|
||||
DevicePath = GetEfiGlobalVariable (L"ConIn");
|
||||
AllDevicePath = GetEfiGlobalVariable (L"ConInDev");
|
||||
GetEfiGlobalVariable2 (L"ConIn", (VOID**)&DevicePath, NULL);
|
||||
GetEfiGlobalVariable2 (L"ConInDev", (VOID**)&AllDevicePath, NULL);
|
||||
break;
|
||||
|
||||
case BM_CONSOLE_OUT_CONTEXT_SELECT:
|
||||
ConsoleMenu = &ConsoleOutMenu;
|
||||
DevicePath = GetEfiGlobalVariable (L"ConOut");
|
||||
AllDevicePath = GetEfiGlobalVariable (L"ConOutDev");
|
||||
GetEfiGlobalVariable2 (L"ConOut", (VOID**)&DevicePath, NULL);
|
||||
GetEfiGlobalVariable2 (L"ConOutDev", (VOID**)&AllDevicePath, NULL);
|
||||
break;
|
||||
|
||||
case BM_CONSOLE_ERR_CONTEXT_SELECT:
|
||||
ConsoleMenu = &ConsoleErrMenu;
|
||||
DevicePath = GetEfiGlobalVariable (L"ErrOut");
|
||||
AllDevicePath = GetEfiGlobalVariable (L"ErrOutDev");
|
||||
GetEfiGlobalVariable2 (L"ErrOut", (VOID**)&DevicePath, NULL);
|
||||
GetEfiGlobalVariable2 (L"ErrOutDev", (VOID**)&AllDevicePath, NULL);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -317,9 +317,9 @@ Var_UpdateAllConsoleOption (
|
|||
EFI_DEVICE_PATH_PROTOCOL *ErrDevicePath;
|
||||
EFI_STATUS Status;
|
||||
|
||||
OutDevicePath = GetEfiGlobalVariable (L"ConOut");
|
||||
InpDevicePath = GetEfiGlobalVariable (L"ConIn");
|
||||
ErrDevicePath = GetEfiGlobalVariable (L"ErrOut");
|
||||
GetEfiGlobalVariable2 (L"ConOut", (VOID**)&OutDevicePath, NULL);
|
||||
GetEfiGlobalVariable2 (L"ConIn", (VOID**)&InpDevicePath, NULL);
|
||||
GetEfiGlobalVariable2 (L"ErrOut", (VOID**)&ErrDevicePath, NULL);
|
||||
if (OutDevicePath != NULL) {
|
||||
ChangeVariableDevicePath (OutDevicePath);
|
||||
Status = gRT->SetVariable (
|
||||
|
@ -395,7 +395,7 @@ Var_UpdateConsoleOption (
|
|||
EFI_DEVICE_PATH_PROTOCOL *TerminalDevicePath;
|
||||
UINTN Index;
|
||||
|
||||
ConDevicePath = GetEfiGlobalVariable (ConsoleName);
|
||||
GetEfiGlobalVariable2 (ConsoleName, (VOID**)&ConDevicePath, NULL);
|
||||
if (ConDevicePath != NULL) {
|
||||
EfiLibDeleteVariable (ConsoleName, &gEfiGlobalVariableGuid);
|
||||
FreePool (ConDevicePath);
|
||||
|
|
|
@ -219,13 +219,13 @@ InitializeLanguage (
|
|||
//
|
||||
HiiHandle = gFrontPagePrivate.HiiHandle;
|
||||
|
||||
CurrentLang = GetEfiGlobalVariable (L"PlatformLang");
|
||||
GetEfiGlobalVariable2 (L"PlatformLang", (VOID**)&CurrentLang, NULL);
|
||||
|
||||
if (mLanguageString == NULL) {
|
||||
//
|
||||
// Get Support language list from variable.
|
||||
//
|
||||
mLanguageString = GetEfiGlobalVariable (L"PlatformLangCodes");
|
||||
GetEfiGlobalVariable2 (L"PlatformLangCodes", (VOID**)&mLanguageString, NULL);
|
||||
if (mLanguageString == NULL) {
|
||||
mLanguageString = AllocateCopyPool (
|
||||
AsciiStrSize ((CHAR8 *) PcdGetPtr (PcdUefiVariableDefaultPlatformLangCodes)),
|
||||
|
|
|
@ -76,7 +76,7 @@ BmGetControllerName (
|
|||
}
|
||||
|
||||
if (!EFI_ERROR (Status)) {
|
||||
LanguageVariable = GetEfiGlobalVariable (Iso639Language ? L"Lang" : L"PlatformLang");
|
||||
GetEfiGlobalVariable2 (Iso639Language ? L"Lang" : L"PlatformLang", (VOID**)&LanguageVariable, NULL);
|
||||
BestLanguage = GetBestLanguage(
|
||||
ComponentName->SupportedLanguages,
|
||||
Iso639Language,
|
||||
|
|
|
@ -213,7 +213,7 @@ DriverHealthManagerSelectBestLanguage (
|
|||
CHAR8 *LanguageVariable;
|
||||
CHAR8 *BestLanguage;
|
||||
|
||||
LanguageVariable = GetEfiGlobalVariable (Iso639Language ? L"Lang" : L"PlatformLang");
|
||||
GetEfiGlobalVariable2 (Iso639Language ? L"Lang" : L"PlatformLang", (VOID**)&LanguageVariable, NULL);
|
||||
|
||||
BestLanguage = GetBestLanguage(
|
||||
SupportedLanguages,
|
||||
|
|
Loading…
Reference in New Issue