Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <[email protected]>
Cc: Ruiyu Ni <[email protected]>
---
.../Application/UiApp/BootMaint/ConsoleOption.c | 18 +++++++++---------
MdeModulePkg/Application/UiApp/BootMaint/Variable.c | 8 ++++----
MdeModulePkg/Application/UiApp/FrontPage.c | 4 ++--
.../Library/UefiBootManagerLib/BmDriverHealth.c | 2 +-
.../DriverHealthManagerDxe/DriverHealthManagerDxe.c | 2 +-
5 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/MdeModulePkg/Application/UiApp/BootMaint/ConsoleOption.c
b/MdeModulePkg/Application/UiApp/BootMaint/ConsoleOption.c
index f4b0e66..ed3ab20 100644
--- a/MdeModulePkg/Application/UiApp/BootMaint/ConsoleOption.c
+++ b/MdeModulePkg/Application/UiApp/BootMaint/ConsoleOption.c
@@ -531,13 +531,13 @@ 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", &OutDevicePath, NULL);
+ GetEfiGlobalVariable2 (L"ConIn", &InpDevicePath, NULL);
+ GetEfiGlobalVariable2 (L"ErrOut", &ErrDevicePath, NULL);
if (OutDevicePath != NULL) {
UpdateComAttributeFromVariable (OutDevicePath);
}
if (InpDevicePath != NULL) {
@@ -754,24 +754,24 @@ GetConsoleMenu (
AllDevicePath = NULL;
AllCount = 0;
switch (ConsoleMenuType) {
case BM_CONSOLE_IN_CONTEXT_SELECT:
ConsoleMenu = &ConsoleInpMenu;
- DevicePath = GetEfiGlobalVariable (L"ConIn");
- AllDevicePath = GetEfiGlobalVariable (L"ConInDev");
+ GetEfiGlobalVariable2 (L"ConIn", &DevicePath, NULL);
+ GetEfiGlobalVariable2 (L"ConInDev", &AllDevicePath, NULL);
break;
case BM_CONSOLE_OUT_CONTEXT_SELECT:
ConsoleMenu = &ConsoleOutMenu;
- DevicePath = GetEfiGlobalVariable (L"ConOut");
- AllDevicePath = GetEfiGlobalVariable (L"ConOutDev");
+ GetEfiGlobalVariable2 (L"ConOut", &DevicePath, NULL);
+ GetEfiGlobalVariable2 (L"ConOutDev", &AllDevicePath, NULL);
break;
case BM_CONSOLE_ERR_CONTEXT_SELECT:
ConsoleMenu = &ConsoleErrMenu;
- DevicePath = GetEfiGlobalVariable (L"ErrOut");
- AllDevicePath = GetEfiGlobalVariable (L"ErrOutDev");
+ GetEfiGlobalVariable2 (L"ErrOut", &DevicePath, NULL);
+ GetEfiGlobalVariable2 (L"ErrOutDev", &AllDevicePath, NULL);
break;
default:
return EFI_UNSUPPORTED;
}
diff --git a/MdeModulePkg/Application/UiApp/BootMaint/Variable.c
b/MdeModulePkg/Application/UiApp/BootMaint/Variable.c
index c80fada..68cfff2 100644
--- a/MdeModulePkg/Application/UiApp/BootMaint/Variable.c
+++ b/MdeModulePkg/Application/UiApp/BootMaint/Variable.c
@@ -315,13 +315,13 @@ Var_UpdateAllConsoleOption (
EFI_DEVICE_PATH_PROTOCOL *OutDevicePath;
EFI_DEVICE_PATH_PROTOCOL *InpDevicePath;
EFI_DEVICE_PATH_PROTOCOL *ErrDevicePath;
EFI_STATUS Status;
- OutDevicePath = GetEfiGlobalVariable (L"ConOut");
- InpDevicePath = GetEfiGlobalVariable (L"ConIn");
- ErrDevicePath = GetEfiGlobalVariable (L"ErrOut");
+ GetEfiGlobalVariable2 (L"ConOut", &OutDevicePath, NULL);
+ GetEfiGlobalVariable2 (L"ConIn", &InpDevicePath, NULL);
+ GetEfiGlobalVariable2 (L"ErrOut", &ErrDevicePath, NULL);
if (OutDevicePath != NULL) {
ChangeVariableDevicePath (OutDevicePath);
Status = gRT->SetVariable (
L"ConOut",
&gEfiGlobalVariableGuid,
@@ -393,11 +393,11 @@ Var_UpdateConsoleOption (
EFI_STATUS Status;
VENDOR_DEVICE_PATH Vendor;
EFI_DEVICE_PATH_PROTOCOL *TerminalDevicePath;
UINTN Index;
- ConDevicePath = GetEfiGlobalVariable (ConsoleName);
+ GetEfiGlobalVariable2 (ConsoleName, &ConDevicePath, NULL);
if (ConDevicePath != NULL) {
EfiLibDeleteVariable (ConsoleName, &gEfiGlobalVariableGuid);
FreePool (ConDevicePath);
ConDevicePath = NULL;
};
diff --git a/MdeModulePkg/Application/UiApp/FrontPage.c
b/MdeModulePkg/Application/UiApp/FrontPage.c
index b0bdf26..709207e 100644
--- a/MdeModulePkg/Application/UiApp/FrontPage.c
+++ b/MdeModulePkg/Application/UiApp/FrontPage.c
@@ -217,17 +217,17 @@ InitializeLanguage (
//
// Collect the languages from what our current Language support is based on
our VFR
//
HiiHandle = gFrontPagePrivate.HiiHandle;
- CurrentLang = GetEfiGlobalVariable (L"PlatformLang");
+ GetEfiGlobalVariable2 (L"PlatformLang", &CurrentLang, NULL);
if (mLanguageString == NULL) {
//
// Get Support language list from variable.
//
- mLanguageString = GetEfiGlobalVariable (L"PlatformLangCodes");
+ GetEfiGlobalVariable2 (L"PlatformLangCodes", &mLanguageString, NULL);
if (mLanguageString == NULL) {
mLanguageString = AllocateCopyPool (
AsciiStrSize ((CHAR8 *) PcdGetPtr
(PcdUefiVariableDefaultPlatformLangCodes)),
(CHAR8 *) PcdGetPtr
(PcdUefiVariableDefaultPlatformLangCodes)
);
diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmDriverHealth.c
b/MdeModulePkg/Library/UefiBootManagerLib/BmDriverHealth.c
index d197816..7fb792b 100644
--- a/MdeModulePkg/Library/UefiBootManagerLib/BmDriverHealth.c
+++ b/MdeModulePkg/Library/UefiBootManagerLib/BmDriverHealth.c
@@ -74,11 +74,11 @@ BmGetControllerName (
Iso639Language = TRUE;
}
}
if (!EFI_ERROR (Status)) {
- LanguageVariable = GetEfiGlobalVariable (Iso639Language ? L"Lang" :
L"PlatformLang");
+ GetEfiGlobalVariable2 (Iso639Language ? L"Lang" : L"PlatformLang",
&LanguageVariable, NULL);
BestLanguage = GetBestLanguage(
ComponentName->SupportedLanguages,
Iso639Language,
(LanguageVariable != NULL) ? LanguageVariable : "",
Iso639Language ? "eng" : "en-US",
diff --git
a/MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.c
b/MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.c
index 3c863e5..d4240ee 100644
--- a/MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.c
+++ b/MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.c
@@ -211,11 +211,11 @@ DriverHealthManagerSelectBestLanguage (
)
{
CHAR8 *LanguageVariable;
CHAR8 *BestLanguage;
- LanguageVariable = GetEfiGlobalVariable (Iso639Language ? L"Lang" :
L"PlatformLang");
+ GetEfiGlobalVariable2 (Iso639Language ? L"Lang" : L"PlatformLang",
&LanguageVariable, NULL);
BestLanguage = GetBestLanguage(
SupportedLanguages,
Iso639Language,
(LanguageVariable != NULL) ? LanguageVariable : "",
--
1.9.5.msysgit.1
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel