UINTN Removable;\r
UINTN Index;\r
CHAR16 *Description;\r
- UINT32 BootAttributes;\r
\r
ASSERT (BootOptionCount != NULL);\r
\r
&Handles\r
);\r
for (Index = 0; Index < HandleCount; Index++) {\r
+ //\r
+ // Ignore BootManagerMenu. its boot option will be created by EfiBootManagerGetBootManagerMenu().\r
+ //\r
+ if (BmIsBootManagerMenuFilePath (DevicePathFromHandle (Handles[Index]))) {\r
+ continue;\r
+ }\r
\r
Description = BmGetBootDescription (Handles[Index]);\r
BootOptions = ReallocatePool (\r
);\r
ASSERT (BootOptions != NULL);\r
\r
- //\r
- // If LoadFile includes BootManagerMenu, its boot attribue will be set to APP and HIDDEN.\r
- //\r
- BootAttributes = LOAD_OPTION_ACTIVE;\r
- if (BmIsBootManagerMenuFilePath (DevicePathFromHandle (Handles[Index]))) {\r
- BootAttributes = LOAD_OPTION_CATEGORY_APP | LOAD_OPTION_ACTIVE | LOAD_OPTION_HIDDEN;\r
- }\r
-\r
Status = EfiBootManagerInitializeLoadOption (\r
&BootOptions[(*BootOptionCount)++],\r
LoadOptionNumberUnassigned,\r
LoadOptionTypeBoot,\r
- BootAttributes,\r
+ LOAD_OPTION_ACTIVE,\r
Description,\r
DevicePathFromHandle (Handles[Index]),\r
NULL,\r