mirror of
https://github.com/reactos/reactos.git
synced 2025-06-17 09:04:06 +00:00
[SETUPLIB] Code re-organization in bootsup.c and fsutil.c.
- Move the actual VBR bootcode installation helpers into fsutil.c (they depend on the selected filesystem). - Introduce InstallBootCodeToDisk() and InstallBootCodeToFile() and bootcode.c helpers, in order to replace the several functions that were duplicating the same code.
This commit is contained in:
parent
b51b8ee2d5
commit
593bcce999
7 changed files with 784 additions and 1312 deletions
37
base/setup/lib/bootcode.h
Normal file
37
base/setup/lib/bootcode.h
Normal file
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
* PROJECT: ReactOS Setup Library
|
||||
* LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
|
||||
* PURPOSE: BootCode support functions.
|
||||
* COPYRIGHT: Copyright 2020 Hermes Belusca-Maito
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifdef SECTORSIZE
|
||||
#undef SECTORSIZE
|
||||
#endif
|
||||
#define SECTORSIZE 512
|
||||
|
||||
typedef struct _BOOTCODE
|
||||
{
|
||||
PVOID BootCode;
|
||||
ULONG Length;
|
||||
} BOOTCODE, *PBOOTCODE;
|
||||
|
||||
NTSTATUS
|
||||
ReadBootCodeByHandle(
|
||||
IN OUT PBOOTCODE BootCodeInfo,
|
||||
IN HANDLE FileHandle,
|
||||
IN ULONG Length OPTIONAL);
|
||||
|
||||
NTSTATUS
|
||||
ReadBootCodeFromFile(
|
||||
IN OUT PBOOTCODE BootCodeInfo,
|
||||
IN PUNICODE_STRING FilePath,
|
||||
IN ULONG Length OPTIONAL);
|
||||
|
||||
VOID
|
||||
FreeBootCode(
|
||||
IN OUT PBOOTCODE BootCodeInfo);
|
||||
|
||||
/* EOF */
|
Loading…
Add table
Add a link
Reference in a new issue