Initial modules support
This commit is contained in:
@@ -963,6 +963,9 @@ BlDisplayInputDialog(IN PWCHAR Caption,
|
||||
|
||||
|
||||
|
||||
XTCDECL
|
||||
EFI_STATUS
|
||||
BlInvokeBootProtocol(IN PLIST_ENTRY Options);
|
||||
|
||||
|
||||
|
||||
@@ -1075,10 +1078,17 @@ BlDisplayBootMenu()
|
||||
BlSetConsoleAttributes(Handle.DialogColor | Handle.TextColor);
|
||||
BlClearConsoleLine(Handle.PosY + Handle.Height + 4);
|
||||
BlSetCursorPosition(4, Handle.PosY + Handle.Height + 4);
|
||||
BlConsolePrint(L"Booting '%S' now...", MenuEntries[HighligtedEntryId].EntryName);
|
||||
BlConsolePrint(L"Booting '%S' now...\n", MenuEntries[HighligtedEntryId].EntryName);
|
||||
|
||||
/* Boot the highlighted (chosen) OS */
|
||||
BlDisplayInfoDialog(L"XTLDR", L"Booting highlighted OS ...");
|
||||
Status = BlInvokeBootProtocol(MenuEntries[HighligtedEntryId].Options);
|
||||
if(Status != STATUS_SUCCESS)
|
||||
{
|
||||
/* Failed to boot OS */
|
||||
BlDebugPrint(L"Failed to boot OS '%S' with status code: 0x%lx!\n",
|
||||
MenuEntries[HighligtedEntryId].EntryName, Status);
|
||||
BlDisplayErrorDialog(L"XTLDR", L"Failed to startup the selected Operating System.");
|
||||
}
|
||||
|
||||
/* Break from boot menu event loop to redraw whole boot menu */
|
||||
break;
|
||||
@@ -1178,13 +1188,20 @@ BlDisplayBootMenu()
|
||||
BlSetConsoleAttributes(Handle.DialogColor | Handle.TextColor);
|
||||
BlClearConsoleLine(Handle.PosY + Handle.Height + 4);
|
||||
BlSetCursorPosition(4, Handle.PosY + Handle.Height + 4);
|
||||
BlConsolePrint(L"Booting '%S' now...", MenuEntries[HighligtedEntryId].EntryName);
|
||||
BlConsolePrint(L"Booting '%S' now...\n", MenuEntries[HighligtedEntryId].EntryName);
|
||||
|
||||
/* Disable the timer just in case booting OS fails */
|
||||
TimeOut = -1;
|
||||
|
||||
/* Boot the highlighted (default) OS */
|
||||
BlDisplayInfoDialog(L"XTLDR", L"Booting highlighted OS ...");
|
||||
Status = BlInvokeBootProtocol(MenuEntries[HighligtedEntryId].Options);
|
||||
if(Status != STATUS_SUCCESS)
|
||||
{
|
||||
/* Failed to boot OS */
|
||||
BlDebugPrint(L"Failed to boot OS '%S' with status code: 0x%lx!\n",
|
||||
MenuEntries[HighligtedEntryId].EntryName, Status);
|
||||
BlDisplayErrorDialog(L"XTLDR", L"Failed to startup the selected Operating System.");
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user