alcyone/BOOT/ENVIRON/APP/BOOTMGR/bootmgr.c

60 lines
970 B
C

/*++
Copyright (c) 2024, Quinn Stephens.
Provided under the BSD 3-Clause license.
Module Name:
bootmgr.c
Abstract:
Main functions of the boot manager.
--*/
#include "bootmgr.h"
#include "bootlib.h"
NTSTATUS
BmMain (
IN PBOOT_INPUT_PARAMETERS InputParameters
)
/*++
Routine Description:
Firmware-independent boot manager entry point.
Arguments:
InputParameters - Input parameters for the boot manager.
Return Value:
Error code on failure.
Does not return on success, as control is transferred to the OS loader.
--*/
{
NTSTATUS Status;
BOOT_LIBRARY_PARAMETERS LibraryParameters;
LibraryParameters.Flags = 0;
//
// Initialize the boot library.
//
Status = BlInitializeLibrary(InputParameters, &LibraryParameters);
if (!NT_SUCCESS(Status)) {
ConsolePrintf(L"BlInitializeLibrary() failed: 0x%x\r\n", Status);
goto Exit;
}
Exit:
BlDestroyLibrary();
return Status;
}