[FREELDR] Unload freeldr.ini file before booting.

This commit is contained in:
Hermès Bélusca-Maïto 2019-07-30 02:11:26 +02:00
parent 5cdb76094c
commit e79e7bf53c
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0
4 changed files with 12 additions and 6 deletions

View file

@ -280,5 +280,6 @@ VOID RunLoader(VOID)
Reboot:
UiUnInitialize("Rebooting...");
IniCleanup();
return;
}

View file

@ -164,6 +164,7 @@ LoadAndBootLinux(IN OperatingSystemItem* OperatingSystem,
RtlCopyMemory((PVOID)0x99000, LinuxCommandLine, LinuxCommandLineSize);
UiUnInitialize("Booting Linux...");
IniCleanup();
DiskStopFloppyMotor();

View file

@ -73,6 +73,7 @@ LoadAndBootBootSector(IN OperatingSystemItem* OperatingSystem,
}
UiUnInitialize("Booting...");
IniCleanup();
/*
* Don't stop the floppy drive motor when we
@ -148,6 +149,7 @@ LoadAndBootPartition(IN OperatingSystemItem* OperatingSystem,
}
UiUnInitialize("Booting...");
IniCleanup();
/*
* Don't stop the floppy drive motor when we
@ -206,6 +208,7 @@ LoadAndBootDrive(IN OperatingSystemItem* OperatingSystem,
}
UiUnInitialize("Booting...");
IniCleanup();
/*
* Don't stop the floppy drive motor when we

View file

@ -103,12 +103,12 @@ WinLdrInitializePhase1(PLOADER_PARAMETER_BLOCK LoaderBlock,
TRACE("SystemRoot: %s\n", SystemRoot);
TRACE("Options: %s\n", Options);
/* Fill Arc BootDevice */
/* Fill ARC BootDevice */
LoaderBlock->ArcBootDeviceName = WinLdrSystemBlock->ArcBootDeviceName;
strncpy(LoaderBlock->ArcBootDeviceName, ArcBoot, MAX_PATH);
LoaderBlock->ArcBootDeviceName = PaToVa(LoaderBlock->ArcBootDeviceName);
/* Fill Arc HalDevice, it matches ArcBoot path */
/* Fill ARC HalDevice, it matches ArcBoot path */
LoaderBlock->ArcHalDeviceName = WinLdrSystemBlock->ArcBootDeviceName;
LoaderBlock->ArcHalDeviceName = PaToVa(LoaderBlock->ArcHalDeviceName);
@ -136,7 +136,7 @@ WinLdrInitializePhase1(PLOADER_PARAMETER_BLOCK LoaderBlock,
LoaderBlock->LoadOptions = PaToVa(LoaderBlock->LoadOptions);
/* Arc devices */
/* ARC devices */
LoaderBlock->ArcDiskInformation = &WinLdrSystemBlock->ArcDiskInformation;
InitializeListHead(&LoaderBlock->ArcDiskInformation->DiskSignatureListHead);
@ -784,6 +784,7 @@ LoadAndBootWindowsCommon(
PLDR_DATA_TABLE_ENTRY KernelDTE;
KERNEL_ENTRY_POINT KiSystemStartup;
LPCSTR SystemRoot;
TRACE("LoadAndBootWindowsCommon()\n");
#ifdef _M_IX86
@ -820,6 +821,9 @@ LoadAndBootWindowsCommon(
Success = WinLdrLoadBootDrivers(LoaderBlock, BootPath);
TRACE("Boot drivers loading %s\n", Success ? "successful" : "failed");
/* Cleanup ini file */
IniCleanup();
/* Initialize Phase 1 - no drivers loading anymore */
WinLdrInitializePhase1(LoaderBlock,
BootOptions,
@ -834,9 +838,6 @@ LoadAndBootWindowsCommon(
/* "Stop all motors", change videomode */
MachPrepareForReactOS();
/* Cleanup ini file */
IniCleanup();
/* Debugging... */
//DumpMemoryAllocMap();