[BOOT:BOOTMGR] Begin work on BCD support

Added stub for BmOpenDataStore()
This commit is contained in:
Quinn Stephens 2024-08-25 10:43:48 -04:00
parent b8afb1aad4
commit e61d0f5155
3 changed files with 67 additions and 0 deletions

View File

@ -0,0 +1,56 @@
/*++
Copyright (c) 2024, Quinn Stephens.
Provided under the BSD 3-Clause license.
Module Name:
bcd.c
Abstract:
BCD (Boot Configuration Data, aka Boot Data Store) routines.
--*/
#include "bootlib.h"
NTSTATUS
BmOpenDataStore (
IN OUT PHANDLE DataStore
)
/*++
Routine Description:
Opens the boot configuration data store.
Arguments:
DataStore - pointer to memory to put the data store handle in.
Return Value:
STATUS_SUCCESS if successful,
Other NTSTATUS value on failure.
--*/
{
*DataStore = INVALID_HANDLE_VALUE;
/*
NTSTATUS Status;
PBOOT_DEVICE Device;
PWSTR FilePath;
BOOLEAN FilePathSet;
Device = NULL;
FilePath = NULL;
FilePathSet = FALSE;
return BmGetDataStorePath(&Device, &FilePath, &FilePathSet);
*/
return STATUS_SUCCESS;
}

View File

@ -41,6 +41,7 @@ Return Value:
{
NTSTATUS Status;
BOOT_LIBRARY_PARAMETERS LibraryParameters;
HANDLE DataStore;
LibraryParameters.Flags = 0;
@ -53,6 +54,11 @@ Return Value:
goto Exit;
}
//
// Open the boot data store.
//
(VOID)BmOpenDataStore(&DataStore);
Exit:
BlDestroyLibrary();
return Status;

View File

@ -244,6 +244,11 @@ typedef struct {
BOOT_DEVICE Device;
} BCDE_DEVICE, *PBCDE_DEVICE;
NTSTATUS
BmOpenDataStore (
IN OUT PHANDLE DataStore
);
NTSTATUS
BmMain (
IN PBOOT_INPUT_PARAMETERS InputParameters