/* Boot the file specified by the input file path info. */
BOOLEAN EFIAPI BootFromFile(IN EFI_DEVICE_PATH_PROTOCOL *FilePath)
/* Boot the file specified by the input file path info. */
BOOLEAN EFIAPI BootFromFile(IN EFI_DEVICE_PATH_PROTOCOL *FilePath)
{
  EFI_STATUS                    Status;
  EFI_BOOT_MANAGER_LOAD_OPTION  BootOption;
  CHAR16                        *FileName;
  Status   = EFI_NOT_STARTED;
  FileName = NULL;
  FileName = ExtractFileNameFromDevicePath (FilePath);
  if (FileName != NULL) {
    Status = EfiBootManagerInitializeLoadOption (
               &BootOption,
               0,
               LoadOptionTypeBoot,
               LOAD_OPTION_ACTIVE,
               FileName,
               FilePath,
               NULL,
               0
               );
  }
  if (!EFI_ERROR (Status)) {
    gST->ConOut->ClearScreen (gST->ConOut);
    BmmSetupResetReminder ();
    BmmSetConsoleMode (FALSE);
    EfiBootManagerBoot (&BootOption);
    BmmSetConsoleMode (TRUE);
    FreePool (FileName);
    EfiBootManagerFreeLoadOption (&BootOption);
  }
  return FALSE;
}