]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Application/UiApp/FrontPageCustomizedUi.c
MdeModulePkg/UiApp: Show test key warning info in FrontPage.
[mirror_edk2.git] / MdeModulePkg / Application / UiApp / FrontPageCustomizedUi.c
index 6e4f7b5c22b41bce95590bc8234ce6a97094aee5..a9d22696602d12abbd44485a768474a7e9644941 100644 (file)
@@ -16,8 +16,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Protocol/HiiConfigAccess.h>\r
 #include <Library/BaseLib.h>\r
 #include <Library/MemoryAllocationLib.h>\r
+#include "FrontPage.h"\r
 #include "FrontPageCustomizedUiSupport.h"\r
 \r
+extern FRONT_PAGE_CALLBACK_DATA  gFrontPagePrivate;\r
+\r
 /**\r
   Customize menus in the page.\r
 \r
@@ -129,4 +132,14 @@ UiCustomizeFrontPageBanner (
   IN OUT EFI_STRING     *BannerStr\r
   )\r
 {\r
+  if ((LineIndex == 5) && LeftOrRight) {\r
+    // Update STR_CUSTOMIZE_BANNER_LINE5_LEFT\r
+    if (PcdGetBool(PcdTestKeyUsed)) {\r
+      if (BannerStr != NULL) {\r
+        FreePool(*BannerStr);\r
+      }\r
+      *BannerStr = HiiGetString(gFrontPagePrivate.HiiHandle, STRING_TOKEN(STR_TEST_KEY_USED), NULL);\r
+    }\r
+  }\r
+  return;\r
 }\r