From: niruiyu Date: Thu, 6 Jan 2011 09:45:03 +0000 (+0000) Subject: Fix the bug that duplicate HDD is shown in the BMM. X-Git-Tag: edk2-stable201903~15242 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=b1620d0beecd3bd947e1d81150454d0d57b76dc2;p=mirror_edk2.git 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 --- 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.
+Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.
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 );