summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorniruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524>2011-01-06 09:45:03 +0000
committerniruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524>2011-01-06 09:45:03 +0000
commitb1620d0beecd3bd947e1d81150454d0d57b76dc2 (patch)
tree4082000b499518303fc6a2d598eeb7c26a783697
parente519983a6cba0f410299ab9e2e970bb369e67bc6 (diff)
downloadedk2-platforms-b1620d0beecd3bd947e1d81150454d0d57b76dc2.tar.xz
Fix the bug that duplicate HDD is shown in the BMM.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11233 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c
index 137a622c90..560ea14ce1 100644
--- a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c
+++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c
@@ -1,7 +1,7 @@
/** @file
Dynamically update the pages.
-Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -1310,21 +1310,13 @@ UpdateSetLegacyDeviceOrderPage (
for (Index = 0; Index < OptionMenu->MenuNumber; Index++) {
NewMenuEntry = BOpt_GetMenuEntry (OptionMenu, Index);
-
- if (Index == 0) {
- HiiCreateOneOfOptionOpCode (
- OptionsOpCodeHandle,
- NewMenuEntry->DisplayStringToken,
- EFI_IFR_OPTION_DEFAULT,
- EFI_IFR_NUMERIC_SIZE_1,
- (UINT8) ((BM_LEGACY_DEVICE_CONTEXT *) NewMenuEntry->VariableContext)->Index
- );
- }
-
+ //
+ // Create OneOf for each legacy device, select the first one by default
+ //
HiiCreateOneOfOptionOpCode (
OptionsOpCodeHandle,
NewMenuEntry->DisplayStringToken,
- 0,
+ (Index == 0) ? EFI_IFR_OPTION_DEFAULT : 0,
EFI_IFR_NUMERIC_SIZE_1,
(UINT8) ((BM_LEGACY_DEVICE_CONTEXT *) NewMenuEntry->VariableContext)->Index
);