summaryrefslogtreecommitdiff
path: root/MdeModulePkg
diff options
context:
space:
mode:
authorEric Dong <eric.dong@intel.com>2015-07-27 07:40:18 +0000
committerydong10 <ydong10@Edk2>2015-07-27 07:40:18 +0000
commit8fa9ac60f5afe8fe6ef874d71df95413ad6faa2b (patch)
tree3188db301ea1d87a8836bfc5ec6c62193022467b /MdeModulePkg
parent410952bf8bd071d5541dd82ac16069cd3b50e09b (diff)
downloadedk2-platforms-8fa9ac60f5afe8fe6ef874d71df95413ad6faa2b.tar.xz
Support get string from configuration string packages.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18074 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Library/UefiHiiLib/HiiString.c9
-rw-r--r--MdeModulePkg/Universal/HiiDatabaseDxe/String.c6
2 files changed, 8 insertions, 7 deletions
diff --git a/MdeModulePkg/Library/UefiHiiLib/HiiString.c b/MdeModulePkg/Library/UefiHiiLib/HiiString.c
index bfca2062c2..bfae3f8fc0 100644
--- a/MdeModulePkg/Library/UefiHiiLib/HiiString.c
+++ b/MdeModulePkg/Library/UefiHiiLib/HiiString.c
@@ -1,7 +1,7 @@
/** @file
HII Library implementation that uses DXE protocols and services.
- Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -106,6 +106,13 @@ HiiSetString (
if (*Supported != 0) {
*(Supported++) = '\0';
}
+
+ if ((SupportedLanguages == NULL) && AsciiStrnCmp (Language, UEFI_CONFIG_LANG, AsciiStrLen (UEFI_CONFIG_LANG)) == 0) {
+ //
+ // Skip string package used for keyword protocol.
+ //
+ continue;
+ }
//
// If StringId is 0, then call NewString(). Otherwise, call SetString()
diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/String.c b/MdeModulePkg/Universal/HiiDatabaseDxe/String.c
index 172b3fb0ce..2d04be4b62 100644
--- a/MdeModulePkg/Universal/HiiDatabaseDxe/String.c
+++ b/MdeModulePkg/Universal/HiiDatabaseDxe/String.c
@@ -1834,12 +1834,6 @@ HiiGetLanguages (
Link = Link->ForwardLink
) {
StringPackage = CR (Link, HII_STRING_PACKAGE_INSTANCE, StringEntry, HII_STRING_PACKAGE_SIGNATURE);
- if (AsciiStrnCmp (StringPackage->StringPkgHdr->Language, UEFI_CONFIG_LANG, AsciiStrLen (UEFI_CONFIG_LANG)) == 0) {
- //
- // Skip string package used for keyword protocol.
- //
- continue;
- }
ResultSize += AsciiStrSize (StringPackage->StringPkgHdr->Language);
if (ResultSize <= *LanguagesSize) {
AsciiStrCpyS (Languages, *LanguagesSize / sizeof (CHAR8), StringPackage->StringPkgHdr->Language);