MdeModulePkg BootMaintenanceManagerUiLib: Move refresh boot option later
authorLiming Gao <liming.gao@intel.com>
Thu, 21 Jun 2018 12:06:17 +0000 (20:06 +0800)
committerLiming Gao <liming.gao@intel.com>
Mon, 25 Jun 2018 03:17:01 +0000 (11:17 +0800)
Constructor is too early that ConnectAll() may not do. Move refresh boot
option in form open.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Xu WeiX <weix.xu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenance.c

index 98e14c7..fdcb56a 100644 (file)
@@ -1111,6 +1111,7 @@ BootMaintCallback (
         // 2. Re-scan the BootOption menus (including the legacy boot option).\r
         //\r
         CustomizeMenus ();\r
+        EfiBootManagerRefreshAllBootOption ();\r
         BOpt_GetBootOptions (Private);\r
         mFirstEnterBMMForm = TRUE;\r
       }\r
@@ -1690,8 +1691,6 @@ BootMaintenanceManagerUiLibConstructor (
   Status = gBS->LocateProtocol (&gEfiFormBrowser2ProtocolGuid, NULL, (VOID **) &mBmmCallbackInfo->FormBrowser2);\r
   ASSERT_EFI_ERROR (Status);\r
 \r
-  EfiBootManagerRefreshAllBootOption ();\r
-\r
   //\r
   // Create LoadOption in BmmCallbackInfo for Driver Callback\r
   //\r