/* Attempt to boot each boot option in the BootOptions array. */
BOOLEAN BootBootOptions(IN EFI_BOOT_MANAGER_LOAD_OPTION *BootOptions, IN UINTN BootOptionCount, IN EFI_BOOT_MANAGER_LOAD_OPTION *BootManagerMenu OPTIONAL)
/* Attempt to boot each boot option in the BootOptions array. */
BOOLEAN BootBootOptions(IN EFI_BOOT_MANAGER_LOAD_OPTION *BootOptions, IN UINTN BootOptionCount, IN EFI_BOOT_MANAGER_LOAD_OPTION *BootManagerMenu OPTIONAL)
{
  UINTN  Index;
  REPORT_STATUS_CODE (EFI_PROGRESS_CODE, (EFI_SOFTWARE_DXE_BS_DRIVER | EFI_SW_DXE_BS_PC_ATTEMPT_BOOT_ORDER_EVENT));
  for (Index = 0; Index < BootOptionCount; Index++) {
    if ((BootOptions[Index].Attributes & LOAD_OPTION_ACTIVE) == 0) {
      continue;
    }
    if ((BootOptions[Index].Attributes & LOAD_OPTION_CATEGORY) != LOAD_OPTION_CATEGORY_BOOT) {
      continue;
    }
    EfiBootManagerBoot (&BootOptions[Index]);
    if ((BootManagerMenu != NULL) && (BootOptions[Index].Status == EFI_SUCCESS)) {
      EfiBootManagerBoot (BootManagerMenu);
      break;
    }
  }
  return (BOOLEAN)(Index < BootOptionCount);
}