alcyone/BOOT/ENVIRON/LIB/bootlib.c

108 lines
1.6 KiB
C

/*++
Copyright (c) 2024, Quinn Stephens.
Provided under the BSD 3-Clause license.
Module Name:
bootlib.c
Abstract:
Provides boot library utilities.
--*/
#include "bootlib.h"
NTSTATUS
InitializeLibrary (
IN PBOOT_INPUT_PARAMETERS InputParameters,
IN PBOOT_LIBRARY_PARAMETERS LibraryParameters
)
/*++
Routine Description:
Internal routine to initialize the boot library.
Arguments:
InputParameters - pointer to the input parameters structure.
LibraryParameters - pointer to the library parameters structure.
Return Value:
STATUS_SUCCESS if successful.
--*/
{
(VOID)LibraryParameters;
//
// Verify input parameters structure.
//
if (InputParameters == NULL || InputParameters->Signature != BOOT_INPUT_PARAMETERS_SIGNATURE) {
return STATUS_INVALID_PARAMETER;
}
return STATUS_SUCCESS;
}
NTSTATUS
BlInitializeLibrary (
IN PBOOT_INPUT_PARAMETERS InputParameters,
IN PBOOT_LIBRARY_PARAMETERS LibraryParameters
)
/*++
Routine Description:
Initializes the boot library.
Arguments:
InputParameters - pointer to the input parameters structure.
LibraryParameters - pointer to the library parameters structure.
Return Value:
Any value returned by InitializeLibrary().
--*/
{
return InitializeLibrary(InputParameters, LibraryParameters);
}
NTSTATUS
BlDestroyLibrary (
VOID
)
/*++
Routine Description:
Cleans up after the boot library.
Arguments:
None.
Return Value:
STATUS_SUCCESS if successful.
Error status if an error is encountered.
--*/
{
return STATUS_SUCCESS;
}