mirror of
https://github.com/reactos/reactos.git
synced 2024-09-28 13:34:53 +00:00
[FREELDR]
- more changes LoaderBlock -> BootDriverListHead/LoadOrderListHead - make one more function static svn path=/trunk/; revision=53948
This commit is contained in:
parent
a198408aeb
commit
3f410616c8
|
@ -36,7 +36,7 @@ WinLdrSetProcessorContext(void);
|
|||
// TODO: Move to .h
|
||||
VOID AllocateAndInitLPB(PLOADER_PARAMETER_BLOCK *OutLoaderBlock);
|
||||
|
||||
VOID
|
||||
static VOID
|
||||
SetupLdrLoadNlsData(PLOADER_PARAMETER_BLOCK LoaderBlock, HINF InfHandle, LPCSTR SearchPath)
|
||||
{
|
||||
INFCONTEXT InfContext;
|
||||
|
@ -82,8 +82,8 @@ SetupLdrLoadNlsData(PLOADER_PARAMETER_BLOCK LoaderBlock, HINF InfHandle, LPCSTR
|
|||
TRACE("NLS data loaded with status %d\n", Status);
|
||||
}
|
||||
|
||||
VOID
|
||||
SetupLdrScanBootDrivers(PLOADER_PARAMETER_BLOCK LoaderBlock, HINF InfHandle, LPCSTR SearchPath)
|
||||
static VOID
|
||||
SetupLdrScanBootDrivers(PLIST_ENTRY BootDriverListHead, HINF InfHandle, LPCSTR SearchPath)
|
||||
{
|
||||
INFCONTEXT InfContext, dirContext;
|
||||
BOOLEAN Status;
|
||||
|
@ -118,7 +118,7 @@ SetupLdrScanBootDrivers(PLOADER_PARAMETER_BLOCK LoaderBlock, HINF InfHandle, LPC
|
|||
ServiceName[wcslen(ServiceName) - 4] = 0;
|
||||
|
||||
/* Add it to the list */
|
||||
Status = WinLdrAddDriverToList(&LoaderBlock->BootDriverListHead,
|
||||
Status = WinLdrAddDriverToList(BootDriverListHead,
|
||||
L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\",
|
||||
ImagePathW,
|
||||
ServiceName);
|
||||
|
@ -229,7 +229,7 @@ VOID LoadReactOSSetup(VOID)
|
|||
SetupLdrLoadNlsData(LoaderBlock, InfHandle, FileName);
|
||||
|
||||
/* Get a list of boot drivers */
|
||||
SetupLdrScanBootDrivers(LoaderBlock, InfHandle, BootPath);
|
||||
SetupLdrScanBootDrivers(&LoaderBlock->BootDriverListHead, InfHandle, BootPath);
|
||||
|
||||
|
||||
LoadAndBootWindowsCommon(_WIN32_WINNT_WS03,
|
||||
|
|
|
@ -217,8 +217,8 @@ WinLdrInitializePhase1(PLOADER_PARAMETER_BLOCK LoaderBlock,
|
|||
TRACE("WinLdrInitializePhase1() completed\n");
|
||||
}
|
||||
|
||||
BOOLEAN
|
||||
WinLdrLoadDeviceDriver(PLOADER_PARAMETER_BLOCK LoaderBlock,
|
||||
static BOOLEAN
|
||||
WinLdrLoadDeviceDriver(PLIST_ENTRY LoadOrderListHead,
|
||||
LPSTR BootPath,
|
||||
PUNICODE_STRING FilePath,
|
||||
ULONG Flags,
|
||||
|
@ -249,11 +249,11 @@ WinLdrLoadDeviceDriver(PLOADER_PARAMETER_BLOCK LoaderBlock,
|
|||
DriverPath[0] = 0;
|
||||
}
|
||||
|
||||
TRACE("DriverPath: %s, DllName: %s, LPB %p\n", DriverPath, DllName, LoaderBlock);
|
||||
TRACE("DriverPath: %s, DllName: %s, LPB\n", DriverPath, DllName);
|
||||
|
||||
|
||||
// Check if driver is already loaded
|
||||
Status = WinLdrCheckForLoadedDll(&LoaderBlock->LoadOrderListHead, DllName, DriverDTE);
|
||||
Status = WinLdrCheckForLoadedDll(LoadOrderListHead, DllName, DriverDTE);
|
||||
if (Status)
|
||||
{
|
||||
// We've got the pointer to its DTE, just return success
|
||||
|
@ -267,7 +267,7 @@ WinLdrLoadDeviceDriver(PLOADER_PARAMETER_BLOCK LoaderBlock,
|
|||
return FALSE;
|
||||
|
||||
// Allocate a DTE for it
|
||||
Status = WinLdrAllocateDataTableEntry(&LoaderBlock->LoadOrderListHead, DllName, DllName, DriverBase, DriverDTE);
|
||||
Status = WinLdrAllocateDataTableEntry(LoadOrderListHead, DllName, DllName, DriverBase, DriverDTE);
|
||||
if (!Status)
|
||||
{
|
||||
ERR("WinLdrAllocateDataTableEntry() failed\n");
|
||||
|
@ -279,7 +279,7 @@ WinLdrLoadDeviceDriver(PLOADER_PARAMETER_BLOCK LoaderBlock,
|
|||
|
||||
// Look for any dependencies it may have, and load them too
|
||||
sprintf(FullPath,"%s%s", BootPath, DriverPath);
|
||||
Status = WinLdrScanImportDescriptorTable(&LoaderBlock->LoadOrderListHead, FullPath, *DriverDTE);
|
||||
Status = WinLdrScanImportDescriptorTable(LoadOrderListHead, FullPath, *DriverDTE);
|
||||
if (!Status)
|
||||
{
|
||||
ERR("WinLdrScanImportDescriptorTable() failed for %s\n", FullPath);
|
||||
|
@ -310,7 +310,7 @@ WinLdrLoadBootDrivers(PLOADER_PARAMETER_BLOCK LoaderBlock,
|
|||
// Paths are relative (FIXME: Are they always relative?)
|
||||
|
||||
// Load it
|
||||
Status = WinLdrLoadDeviceDriver(LoaderBlock, BootPath, &BootDriver->FilePath,
|
||||
Status = WinLdrLoadDeviceDriver(&LoaderBlock->LoadOrderListHead, BootPath, &BootDriver->FilePath,
|
||||
0, &BootDriver->LdrEntry);
|
||||
|
||||
// If loading failed - cry loudly
|
||||
|
|
Loading…
Reference in a new issue