]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkCompatibilityPkg/Compatibility/UcOnUc2Thunk/UcOnUc2Thunk.c
Refine language conversion in ECP. Create a new library LanguageLib providing functio...
[mirror_edk2.git] / EdkCompatibilityPkg / Compatibility / UcOnUc2Thunk / UcOnUc2Thunk.c
index 9a5549fff170624ce962b7e0d3c2a0b99fd7391f..bba93bdaaf1043fd4d464585155a994422357d8f 100644 (file)
@@ -30,8 +30,8 @@ Module Name:
 #include <Library/UefiLib.h>\r
 #include <Library/MemoryAllocationLib.h>\r
 #include <Library/HiiLib.h>\r
-\r
-\r
+#include <Library/BaseMemoryLib.h>\r
+#include <Library/LanguageLib.h>\r
 \r
 /**\r
   Performs a case-insensitive comparison of two Null-terminated Unicode \r
@@ -244,10 +244,9 @@ Uc2NotificationEvent (
     //\r
     // Fill in rest of private data structure\r
     //\r
-    Private->UC.SupportedLanguages = AllocateZeroPool (ISO_639_2_ENTRY_SIZE + 1);\r
-    Status = ConvertRfc3066LanguageToIso639Language (Private->UC2->SupportedLanguages, Private->UC.SupportedLanguages);\r
+    Private->UC.SupportedLanguages = ConvertLanguagesRfc4646ToIso639 (Private->UC2->SupportedLanguages);\r
 \r
-    if (!EFI_ERROR (Status)) {\r
+    if (Private->UC.SupportedLanguages != NULL) {\r
 \r
       //\r
       // Install Firmware Volume Protocol onto same handle\r