]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg:Update Boot Manager form when enter it.
authorDandan Bi <dandan.bi@intel.com>
Tue, 22 Dec 2015 09:16:21 +0000 (09:16 +0000)
committerdandanbi <dandanbi@Edk2>
Tue, 22 Dec 2015 09:16:21 +0000 (09:16 +0000)
Currently BootManager is an independent library,used by UiApp.It only load boot
option when enter UiApp.So when add boot option through boot maintenance manager,
it will not display in boot manager. In order to fix this issue,now we update the
boot manager form every time we enter it.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19440 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Library/BootManagerLib/BootManager.c
MdeModulePkg/Library/BootManagerLib/BootManagerVfr.Vfr

index dd87250743ce8cccb80151337b3012e86f46eb81..7a8ccfe1523b2abeff82743043b05d7530cc4130 100644 (file)
@@ -681,6 +681,18 @@ BootManagerCallback (
   EFI_BOOT_MANAGER_LOAD_OPTION *BootOption;\r
   UINTN                        BootOptionCount;\r
   EFI_INPUT_KEY                Key;\r
+\r
+  if (Action == EFI_BROWSER_ACTION_FORM_OPEN) {\r
+    //\r
+    //Means enter the boot manager form.\r
+    //Update the boot manage page,because the boot option may changed.\r
+    //\r
+    if (QuestionId == 0x1212){\r
+      UpdateBootManager();\r
+    }\r
+    return EFI_SUCCESS;\r
+  }\r
+\r
   if (Action != EFI_BROWSER_ACTION_CHANGED) {\r
     //\r
     // Do nothing for other UEFI Action. Only do call back when data is changed.\r
@@ -759,10 +771,6 @@ BootManagerLibConstructor (
                                     );\r
   ASSERT (gBootManagerPrivate.HiiHandle != NULL);\r
 \r
-  //\r
-  // Update boot manager page \r
-  //\r
-  UpdateBootManager ();\r
 \r
   return EFI_SUCCESS;\r
 }\r
index d3281f55ae5f1f7ab2ff6cc4464029719130da44..14c1f8fae360fabfadaacd100d49f9bb12e4bee2 100644 (file)
@@ -32,6 +32,17 @@ formset
     subtitle text = STRING_TOKEN(STR_BOOT_OPTION_BANNER);\r
     subtitle text = STRING_TOKEN(STR_LAST_STRING);\r
 \r
+    //\r
+    //Add this invisable text in order to indicate enter Boot Manager form.\r
+    //\r
+    suppressif TRUE;\r
+          text\r
+              help  = STRING_TOKEN(STR_LAST_STRING ),\r
+              text  = STRING_TOKEN(STR_LAST_STRING ),\r
+              flags = INTERACTIVE,\r
+              key   = 0x1212;\r
+     endif;\r
+\r
     //\r
     // This is where we will dynamically add choices for the Boot Manager\r
     //\r