Add a way to define custom boot menu handler
All checks were successful
Builds / ExectOS (amd64) (push) Successful in 27s
Builds / ExectOS (i686) (push) Successful in 25s

This commit is contained in:
2023-12-23 10:43:00 +01:00
parent 57b6037dd6
commit ea5365dcfd
4 changed files with 42 additions and 7 deletions

View File

@@ -74,6 +74,24 @@ BlOpenXtProtocol(OUT PVOID *ProtocolHandler,
return STATUS_EFI_SUCCESS;
}
/**
* Registers a boot menu callback routine, that will be used to display alternative boot menu.
*
* @param BootMenuRoutine
* Supplies a pointer to the boot menu callback routine.
*
* @return This routine does not return any value.
*
* @since XT 1.0
*/
XTCDECL
VOID
BlRegisterBootMenu(PVOID BootMenuRoutine)
{
/* Set boot menu routine */
BlpStatus.BootMenu = BootMenuRoutine;
}
/**
* This routine registers XTLDR protocol for further usage by modules.
*
@@ -109,8 +127,9 @@ BlpRegisterXtLoaderProtocol()
LdrProtocol.Memory.AllocatePool = BlMemoryAllocatePool;
LdrProtocol.Memory.FreePages = BlMemoryFreePages;
LdrProtocol.Memory.FreePool = BlMemoryFreePool;
LdrProtocol.Protocol.OpenProtocol = BlOpenXtProtocol;
LdrProtocol.Protocol.InitializeBootMenuList = BlInitializeBootMenuList;
LdrProtocol.Protocol.OpenProtocol = BlOpenXtProtocol;
LdrProtocol.Protocol.RegisterBootMenu = BlRegisterBootMenu;
LdrProtocol.Tui.DisplayErrorDialog = BlDisplayErrorDialog;
LdrProtocol.Tui.DisplayInfoDialog = BlDisplayInfoDialog;
LdrProtocol.Tui.DisplayProgressDialog = BlDisplayProgressDialog;