Store last booted OS in NVRAM and make it default one on next boot

This commit is contained in:
2024-03-18 19:41:55 +01:00
parent ee23cd90cb
commit 1d26b81923
4 changed files with 48 additions and 7 deletions

View File

@@ -135,7 +135,8 @@ BlDisplayBootMenu()
BlConsolePrint(L"Booting '%S' now...\n", MenuEntries[HighligtedEntryId].EntryName);
/* Boot the highlighted (chosen) OS */
Status = BlInvokeBootProtocol(MenuEntries[HighligtedEntryId].Options);
Status = BlInvokeBootProtocol(MenuEntries[HighligtedEntryId].ShortName,
MenuEntries[HighligtedEntryId].Options);
if(Status != STATUS_SUCCESS)
{
/* Failed to boot OS */
@@ -279,7 +280,8 @@ BlDisplayBootMenu()
TimeOut = -1;
/* Boot the highlighted (default) OS */
Status = BlInvokeBootProtocol(MenuEntries[HighligtedEntryId].Options);
Status = BlInvokeBootProtocol(MenuEntries[HighligtedEntryId].ShortName,
MenuEntries[HighligtedEntryId].Options);
if(Status != STATUS_SUCCESS)
{
/* Failed to boot OS */