Roll back changes to apply GetBestLanguage() in HiiDataBase. Exact language match...
[mirror_edk2.git] / MdeModulePkg / Universal / HiiDatabaseDxe / Database.c
index 9081e7c..918559e 100644 (file)
@@ -784,7 +784,6 @@ InsertStringPackage (
   EFI_STATUS                  Status;\r
   EFI_HII_PACKAGE_HEADER      PackageHeader;\r
   CHAR8                       *Language;\r
-  CHAR8                       *MatchedLanguage;\r
   UINT32                      LanguageSize;\r
   LIST_ENTRY                  *Link;\r
 \r
@@ -810,10 +809,8 @@ InsertStringPackage (
   AsciiStrCpy (Language, (CHAR8 *) PackageHdr + HeaderSize - LanguageSize);\r
   for (Link = PackageList->StringPkgHdr.ForwardLink; Link != &PackageList->StringPkgHdr; Link = Link->ForwardLink) {\r
     StringPackage = CR (Link, HII_STRING_PACKAGE_INSTANCE, StringEntry, HII_STRING_PACKAGE_SIGNATURE);\r
-    MatchedLanguage = GetBestLanguage (StringPackage->StringPkgHdr->Language, FALSE, (CHAR8 *) Language, NULL);\r
-    if (MatchedLanguage != NULL) {\r
+    if (HiiCompareLanguage (Language, StringPackage->StringPkgHdr->Language)) {\r
       FreePool (Language);\r
-      FreePool (MatchedLanguage);\r
       return EFI_UNSUPPORTED;\r
     }\r
   }\r