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