MdeModulePkg: Enumerate all string packages in one driver when search the keyword.

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@17471 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Eric Dong 2015-05-19 09:22:59 +00:00 committed by ydong10
parent ee50ff41a6
commit 5f25ead991
1 changed files with 5 additions and 2 deletions

View File

@ -1321,10 +1321,12 @@ GetStringIdFromRecord (
HII_STRING_PACKAGE_INSTANCE *StringPackage;
EFI_STATUS Status;
CHAR8 *Name;
UINT32 RetVal;
ASSERT (DatabaseRecord != NULL && NameSpace != NULL && KeywordValue != NULL);
PackageListNode = DatabaseRecord->PackageList;
RetVal = KEYWORD_HANDLER_NAMESPACE_ID_NOT_FOUND;
if (*NameSpace != NULL) {
Name = *NameSpace;
@ -1338,7 +1340,8 @@ GetStringIdFromRecord (
if (AsciiStrnCmp(Name, StringPackage->StringPkgHdr->Language, AsciiStrLen (Name)) == 0) {
Status = GetStringIdFromString (StringPackage, KeywordValue, StringId);
if (EFI_ERROR (Status)) {
return KEYWORD_HANDLER_KEYWORD_NOT_FOUND;
RetVal = KEYWORD_HANDLER_KEYWORD_NOT_FOUND;
continue;
} else {
if (*NameSpace == NULL) {
*NameSpace = AllocateCopyPool (AsciiStrSize (StringPackage->StringPkgHdr->Language), StringPackage->StringPkgHdr->Language);
@ -1351,7 +1354,7 @@ GetStringIdFromRecord (
}
}
return KEYWORD_HANDLER_NAMESPACE_ID_NOT_FOUND;
return RetVal;
}
/**