Reviewed-by: Liming Gao <liming....@intel.com>
From: Dong, Eric
Sent: Tuesday, May 19, 2015 1:31 PM
To: edk2-devel@lists.sourceforge.net
Cc: Gao, Liming
Subject: [PATCH] MdeModulePkg: Should enumarate all string packages in one
driver
For current logic, it will directly return fail if it not found the keyword in
this string package. This logic has potential issue, it may skip the true
package which has the keyword.
This patch fixed this issue.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.d...@intel.com<mailto:eric.d...@intel.com>>
Index: Universal/HiiDatabaseDxe/ConfigKeywordHandler.c
===================================================================
--- Universal/HiiDatabaseDxe/ConfigKeywordHandler.c (revision
17445)
+++ Universal/HiiDatabaseDxe/ConfigKeywordHandler.c (working copy)
@@ -1321,10 +1321,12 @@
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 @@
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 @@
}
}
- return KEYWORD_HANDLER_NAMESPACE_ID_NOT_FOUND;
+ return RetVal;
}
/**
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel