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
This commit is contained in:
Eric Dong 2015-07-27 07:40:18 +00:00 committed by ydong10
parent 410952bf8b
commit 8fa9ac60f5
2 changed files with 8 additions and 7 deletions

View File

@ -1,7 +1,7 @@
/** @file /** @file
HII Library implementation that uses DXE protocols and services. 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 This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at
@ -106,6 +106,13 @@ HiiSetString (
if (*Supported != 0) { if (*Supported != 0) {
*(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() // If StringId is 0, then call NewString(). Otherwise, call SetString()

View File

@ -1834,12 +1834,6 @@ HiiGetLanguages (
Link = Link->ForwardLink Link = Link->ForwardLink
) { ) {
StringPackage = CR (Link, HII_STRING_PACKAGE_INSTANCE, StringEntry, HII_STRING_PACKAGE_SIGNATURE); 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); ResultSize += AsciiStrSize (StringPackage->StringPkgHdr->Language);
if (ResultSize <= *LanguagesSize) { if (ResultSize <= *LanguagesSize) {
AsciiStrCpyS (Languages, *LanguagesSize / sizeof (CHAR8), StringPackage->StringPkgHdr->Language); AsciiStrCpyS (Languages, *LanguagesSize / sizeof (CHAR8), StringPackage->StringPkgHdr->Language);