]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/HiiDatabaseDxe/String.c
MdeModulePkg: VariableDxe: Use UEFI_VARIABLE_DATA
[mirror_edk2.git] / MdeModulePkg / Universal / HiiDatabaseDxe / String.c
index 756f19c7c3fc2d46cee17329691c4a7d729cd338..d5a7488a79d39ee2201560dc8146881e805451e0 100644 (file)
@@ -2,7 +2,7 @@
 Implementation for EFI_HII_STRING_PROTOCOL.\r
 \r
 \r
-Copyright (c) 2007 - 2015, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>\r
 (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
@@ -106,7 +106,7 @@ ReferFontInfoLocally (
   @param  StringSrc              Points to current null-terminated string.\r
   @param  BufferSize             Length of the buffer.\r
 \r
-  @retval EFI_SUCCESS            The string text was outputed successfully.\r
+  @retval EFI_SUCCESS            The string text was outputted successfully.\r
   @retval EFI_BUFFER_TOO_SMALL   Buffer is insufficient to store the found string\r
                                  text. BufferSize is updated to the required buffer\r
                                  size.\r
@@ -150,7 +150,7 @@ ConvertToUnicodeText (
   @param  StringSrc              Points to current null-terminated string.\r
   @param  BufferSize             Length of the buffer.\r
 \r
-  @retval EFI_SUCCESS            The string text was outputed successfully.\r
+  @retval EFI_SUCCESS            The string text was outputted successfully.\r
   @retval EFI_BUFFER_TOO_SMALL   Buffer is insufficient to store the found string\r
                                  text. BufferSize is updated to the required buffer\r
                                  size.\r
@@ -199,7 +199,7 @@ GetUnicodeStringTextOrSize (
   @param  StringFontInfo         Buffer to record the output font info. It's\r
                                  caller's responsibility to free this buffer.\r
 \r
-  @retval EFI_SUCCESS            The string font is outputed successfully.\r
+  @retval EFI_SUCCESS            The string font is outputted successfully.\r
   @retval EFI_NOT_FOUND          The specified font id does not exist.\r
 \r
 **/\r
@@ -719,7 +719,7 @@ GetStringWorker (
   @param  StringBlockAddr         Output the block address of found string block.  \r
   @param  FontBlock               whether this string block has font info.\r
 \r
-  @retval EFI_SUCCESS            The string font is outputed successfully.\r
+  @retval EFI_SUCCESS            The string font is outputted successfully.\r
   @retval EFI_OUT_OF_RESOURCES   NO resource for the memory to save the new string block.\r
 \r
 **/\r
@@ -1560,6 +1560,18 @@ Done:
     FreePool (StringPackage->StringPkgHdr);\r
     FreePool (StringPackage);\r
   }\r
+  //\r
+  // The contents of HiiDataBase may updated,need to check.\r
+  //\r
+  //\r
+  // Check whether need to get the contents of HiiDataBase.\r
+  // Only after ReadyToBoot to do the export.\r
+  //\r
+  if (gExportAfterReadyToBoot) {\r
+    if (!EFI_ERROR (Status)) {\r
+      HiiGetDatabaseInfo(&Private->HiiDatabase);\r
+    }\r
+  }\r
 \r
   return Status;\r
 }\r
@@ -1755,6 +1767,13 @@ HiiSetString (
           return Status;\r
         }\r
         PackageListNode->PackageListHdr.PackageLength += StringPackage->StringPkgHdr->Header.Length - OldPackageLen;\r
+        //\r
+        // Check whether need to get the contents of HiiDataBase.\r
+        // Only after ReadyToBoot to do the export.\r
+        //\r
+        if (gExportAfterReadyToBoot) {\r
+          HiiGetDatabaseInfo(&Private->HiiDatabase);\r
+        }\r
         return EFI_SUCCESS;\r
       }\r
     }\r