From: Eric Dong Date: Mon, 27 Jul 2015 07:40:18 +0000 (+0000) Subject: Support get string from configuration string packages. X-Git-Tag: edk2-stable201903~9206 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=8fa9ac60f5afe8fe6ef874d71df95413ad6faa2b;hp=410952bf8bd071d5541dd82ac16069cd3b50e09b;p=mirror_edk2.git Support get string from configuration string packages. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong Reviewed-by: Liming Gao git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18074 6f19259b-4bc3-4df7-8a09-765794883524 --- 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.
+ Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.
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);