summaryrefslogtreecommitdiff
path: root/IntelFrameworkModulePkg/Universal/BdsDxe
diff options
context:
space:
mode:
authoreric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>2009-04-27 07:12:20 +0000
committereric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>2009-04-27 07:12:20 +0000
commitd357145fca78f3ec36c477ca47606deb3bf60004 (patch)
tree83a5e6707cc0ed541e6347877211ffe77f6eb901 /IntelFrameworkModulePkg/Universal/BdsDxe
parent72399daee45430942ac39d5807c96f544a09d9dc (diff)
downloadedk2-platforms-d357145fca78f3ec36c477ca47606deb3bf60004.tar.xz
improve platformlangcodes/langcodes and platformlang/lang autoupdate mechanism.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8185 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'IntelFrameworkModulePkg/Universal/BdsDxe')
-rw-r--r--IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.c21
-rw-r--r--IntelFrameworkModulePkg/Universal/BdsDxe/Language.c8
2 files changed, 7 insertions, 22 deletions
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.c b/IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.c
index 73207cc718..10bbf74294 100644
--- a/IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.c
+++ b/IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.c
@@ -156,7 +156,6 @@ FrontPageCallback (
CHAR8 *LanguageString;
CHAR8 *LangCode;
CHAR8 *Lang;
- CHAR8 OldLang[ISO_639_2_ENTRY_SIZE];
UINTN Index;
EFI_STATUS Status;
CHAR8 *PlatformSupportedLanguages;
@@ -230,25 +229,11 @@ FrontPageCallback (
AsciiStrSize (BestLanguage),
Lang
);
-
- if (!FeaturePcdGet (PcdUefiVariableDefaultLangDeprecate)) {
- //
- // Set UEFI deprecated variable "Lang" for backwards compatibility
- //
- Status = ConvertRfc3066LanguageToIso639Language (BestLanguage, 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
- );
- }
- }
FreePool (BestLanguage);
+ } else {
+ ASSERT (FALSE);
}
-
+
FreePool (PlatformSupportedLanguages);
FreePool (Lang);
FreePool (LanguageString);
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/Language.c b/IntelFrameworkModulePkg/Universal/BdsDxe/Language.c
index ae64c7252b..78a6198737 100644
--- a/IntelFrameworkModulePkg/Universal/BdsDxe/Language.c
+++ b/IntelFrameworkModulePkg/Universal/BdsDxe/Language.c
@@ -504,7 +504,7 @@ InitializeLanguage (
EFI_STATUS Status;
UINTN Size;
CHAR8 *Lang;
- CHAR8 LangCode[ISO_639_2_ENTRY_SIZE];
+ CHAR8 LangCode[ISO_639_2_ENTRY_SIZE + 1];
CHAR8 *LangCodes;
CHAR8 *PlatformLang;
CHAR8 *PlatformLangCodes;
@@ -523,7 +523,7 @@ InitializeLanguage (
L"LangCodes",
&gEfiGlobalVariableGuid,
EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,
- AsciiStrLen (LangCodes),
+ AsciiStrSize (LangCodes),
LangCodes
);
}
@@ -547,7 +547,7 @@ InitializeLanguage (
//
// Find current LangCode from Lang NV Variable
//
- Size = ISO_639_2_ENTRY_SIZE;
+ Size = ISO_639_2_ENTRY_SIZE + 1;
Status = gRT->GetVariable (
L"Lang",
&gEfiGlobalVariableGuid,
@@ -576,7 +576,7 @@ InitializeLanguage (
L"Lang",
&gEfiGlobalVariableGuid,
EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,
- ISO_639_2_ENTRY_SIZE,
+ ISO_639_2_ENTRY_SIZE + 1,
Lang
);
}