]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c
Fix the bug that duplicate HDD is shown in the BMM.
[mirror_edk2.git] / IntelFrameworkModulePkg / Universal / BdsDxe / BootMaint / UpdatePage.c
index 137a622c90847f62f98271fd0fc7c775b1e84a68..560ea14ce1aaf6093e33b224c62f0eb9f35bcafd 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 Dynamically update the pages.\r
 \r
-Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -1310,21 +1310,13 @@ UpdateSetLegacyDeviceOrderPage (
 \r
   for (Index = 0; Index < OptionMenu->MenuNumber; Index++) {\r
     NewMenuEntry                = BOpt_GetMenuEntry (OptionMenu, Index);\r
-\r
-    if (Index == 0) {\r
-      HiiCreateOneOfOptionOpCode (\r
-        OptionsOpCodeHandle,\r
-        NewMenuEntry->DisplayStringToken,\r
-        EFI_IFR_OPTION_DEFAULT,\r
-        EFI_IFR_NUMERIC_SIZE_1,\r
-        (UINT8) ((BM_LEGACY_DEVICE_CONTEXT *) NewMenuEntry->VariableContext)->Index\r
-        );\r
-    }\r
-\r
+    //\r
+    // Create OneOf for each legacy device, select the first one by default\r
+    //\r
     HiiCreateOneOfOptionOpCode (\r
       OptionsOpCodeHandle,\r
       NewMenuEntry->DisplayStringToken,\r
-      0,\r
+      (Index == 0) ? EFI_IFR_OPTION_DEFAULT : 0,\r
       EFI_IFR_NUMERIC_SIZE_1,\r
       (UINT8) ((BM_LEGACY_DEVICE_CONTEXT *) NewMenuEntry->VariableContext)->Index\r
       );\r