Revision: 18332
http://sourceforge.net/p/edk2/code/18332
Author: ydong10
Date: 2015-08-27 04:52:24 +0000 (Thu, 27 Aug 2015)
Log Message:
-----------
MdeModulePkg: Replace deprecated function.
Replace GetEfiGlobalVariable with GetEfiGlobalVariable2.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <[email protected]>
Reviewed-by: Ruiyu Ni <[email protected]>
Modified Paths:
--------------
trunk/edk2/MdeModulePkg/Application/UiApp/BootMaint/ConsoleOption.c
trunk/edk2/MdeModulePkg/Application/UiApp/BootMaint/Variable.c
trunk/edk2/MdeModulePkg/Application/UiApp/FrontPage.c
trunk/edk2/MdeModulePkg/Library/UefiBootManagerLib/BmDriverHealth.c
trunk/edk2/MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.c
Modified: trunk/edk2/MdeModulePkg/Application/UiApp/BootMaint/ConsoleOption.c
===================================================================
--- trunk/edk2/MdeModulePkg/Application/UiApp/BootMaint/ConsoleOption.c
2015-08-27 04:51:27 UTC (rev 18331)
+++ trunk/edk2/MdeModulePkg/Application/UiApp/BootMaint/ConsoleOption.c
2015-08-27 04:52:24 UTC (rev 18332)
@@ -533,9 +533,9 @@
//
// 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 @@
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:
Modified: trunk/edk2/MdeModulePkg/Application/UiApp/BootMaint/Variable.c
===================================================================
--- trunk/edk2/MdeModulePkg/Application/UiApp/BootMaint/Variable.c
2015-08-27 04:51:27 UTC (rev 18331)
+++ trunk/edk2/MdeModulePkg/Application/UiApp/BootMaint/Variable.c
2015-08-27 04:52:24 UTC (rev 18332)
@@ -317,9 +317,9 @@
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 @@
EFI_DEVICE_PATH_PROTOCOL *TerminalDevicePath;
UINTN Index;
- ConDevicePath = GetEfiGlobalVariable (ConsoleName);
+ GetEfiGlobalVariable2 (ConsoleName, (VOID**)&ConDevicePath, NULL);
if (ConDevicePath != NULL) {
EfiLibDeleteVariable (ConsoleName, &gEfiGlobalVariableGuid);
FreePool (ConDevicePath);
Modified: trunk/edk2/MdeModulePkg/Application/UiApp/FrontPage.c
===================================================================
--- trunk/edk2/MdeModulePkg/Application/UiApp/FrontPage.c 2015-08-27
04:51:27 UTC (rev 18331)
+++ trunk/edk2/MdeModulePkg/Application/UiApp/FrontPage.c 2015-08-27
04:52:24 UTC (rev 18332)
@@ -219,13 +219,13 @@
//
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)),
Modified: trunk/edk2/MdeModulePkg/Library/UefiBootManagerLib/BmDriverHealth.c
===================================================================
--- trunk/edk2/MdeModulePkg/Library/UefiBootManagerLib/BmDriverHealth.c
2015-08-27 04:51:27 UTC (rev 18331)
+++ trunk/edk2/MdeModulePkg/Library/UefiBootManagerLib/BmDriverHealth.c
2015-08-27 04:52:24 UTC (rev 18332)
@@ -76,7 +76,7 @@
}
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,
Modified:
trunk/edk2/MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.c
===================================================================
---
trunk/edk2/MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.c
2015-08-27 04:51:27 UTC (rev 18331)
+++
trunk/edk2/MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.c
2015-08-27 04:52:24 UTC (rev 18332)
@@ -213,7 +213,7 @@
CHAR8 *LanguageVariable;
CHAR8 *BestLanguage;
- LanguageVariable = GetEfiGlobalVariable (Iso639Language ? L"Lang" :
L"PlatformLang");
+ GetEfiGlobalVariable2 (Iso639Language ? L"Lang" : L"PlatformLang",
(VOID**)&LanguageVariable, NULL);
BestLanguage = GetBestLanguage(
SupportedLanguages,
------------------------------------------------------------------------------
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits