summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal
diff options
context:
space:
mode:
authorqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>2008-05-22 08:37:25 +0000
committerqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>2008-05-22 08:37:25 +0000
commitd6c0ec55e879a91cc5a63a0f255d6086031cc750 (patch)
treefe43577064e5d6b615f57dcfc481979bd7812580 /MdeModulePkg/Universal
parent2d81bfb9832ec5612e18501ea04227acc1e2b221 (diff)
downloadedk2-platforms-d6c0ec55e879a91cc5a63a0f255d6086031cc750.tar.xz
Use Feature Flag PCD to PcdUefiVariableDefaultLangDepricate to replace LANG_SUPPORT.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5269 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal')
-rw-r--r--MdeModulePkg/Universal/BdsDxe/FrontPage.c30
1 files changed, 14 insertions, 16 deletions
diff --git a/MdeModulePkg/Universal/BdsDxe/FrontPage.c b/MdeModulePkg/Universal/BdsDxe/FrontPage.c
index 3151aeb1a5..7f3155b2c2 100644
--- a/MdeModulePkg/Universal/BdsDxe/FrontPage.c
+++ b/MdeModulePkg/Universal/BdsDxe/FrontPage.c
@@ -139,9 +139,7 @@ FrontPageCallback (
CHAR8 *LanguageString;
CHAR8 *LangCode;
CHAR8 Lang[RFC_3066_ENTRY_SIZE];
-#ifdef LANG_SUPPORT
CHAR8 OldLang[ISO_639_2_ENTRY_SIZE];
-#endif
UINTN Index;
EFI_STATUS Status;
@@ -190,21 +188,21 @@ FrontPageCallback (
Lang
);
-#ifdef LANG_SUPPORT
- //
- // Set UEFI deprecated variable "Lang" for backwards compatibility
- //
- Status = ConvertRfc3066LanguageToIso639Language (Lang, OldLang);
- if (!EFI_ERROR (Status)) {
- Status = gRT->SetVariable (
- L"Lang",
- &gEfiGlobalVariableGuid,
- EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,
- ISO_639_2_ENTRY_SIZE,
- OldLang
- );
+ if (!FeaturePcdGet (PcdUefiVariableDefaultLangDepricate)) {
+ //
+ // Set UEFI deprecated variable "Lang" for backwards compatibility
+ //
+ Status = ConvertRfc3066LanguageToIso639Language (Lang, OldLang);
+ if (!EFI_ERROR (Status)) {
+ Status = gRT->SetVariable (
+ L"Lang",
+ &gEfiGlobalVariableGuid,
+ EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,
+ ISO_639_2_ENTRY_SIZE,
+ OldLang
+ );
+ }
}
-#endif
FreePool (LanguageString);
break;