* FILE: ntoskrnl/ex/init.c
* PURPOSE: Executive Initialization Code
* PROGRAMMERS: Alex Ionescu (alex.ionescu@reactos.org)
- * Eric Kohl (ekohl@rz-online.de)
+ * Eric Kohl
*/
/* INCLUDES ******************************************************************/
KernelMode,
&ExpNlsSectionPointer,
NULL);
- ZwClose(NlsSection);
+ ObCloseHandle(NlsSection, KernelMode);
if (!NT_SUCCESS(Status))
{
/* Failed */
PCHAR StringBuffer, EndBuffer, BeginBuffer, MpString = "";
PINIT_BUFFER InitBuffer;
ANSI_STRING TempString;
- ULONG LastTzBias, Size, YearHack = 0, Disposition, MessageCode = 0;
- SIZE_T Length;
+ ULONG LastTzBias, Length, YearHack = 0, Disposition, MessageCode = 0;
+ SIZE_T Size;
PRTL_USER_PROCESS_INFORMATION ProcessInfo;
KEY_VALUE_PARTIAL_INFORMATION KeyPartialInfo;
UNICODE_STRING KeyName, DebugString;
StringBuffer = InitBuffer->VersionBuffer;
BeginBuffer = StringBuffer;
EndBuffer = StringBuffer;
- Length = 256;
+ Size = 256;
if (CmCSDVersionString.Length)
{
/* Print the version string */
Status = RtlStringCbPrintfExA(StringBuffer,
255,
&EndBuffer,
- &Length,
+ &Size,
0,
": %wZ",
&CmCSDVersionString);
else
{
/* No version */
- Length = 255;
+ Size = 255;
}
/* Null-terminate the string */
{
/* Create the banner message */
Status = RtlStringCbPrintfA(EndBuffer,
- Length,
+ Size,
MsgEntry->Text,
StringBuffer,
NtBuildNumber & 0xFFFF,
else
{
/* Use hard-coded banner message */
- Status = RtlStringCbCopyA(EndBuffer, Length, "REACTOS (R)\n");
+ Status = RtlStringCbCopyA(EndBuffer, Size, "REACTOS (R)\n");
if (!NT_SUCCESS(Status))
{
/* Bugcheck */
InbvDisplayString(EndBuffer);
/* Initialize Power Subsystem in Phase 0 */
- if (!PoInitSystem(0, AcpiTableDetected)) KeBugCheck(INTERNAL_POWER_ERROR);
+ if (!PoInitSystem(0)) KeBugCheck(INTERNAL_POWER_ERROR);
/* Check for Y2K hack */
Y2KHackRequired = strstr(CommandLine, "YEAR");
else if (!strncmp(SafeBoot, "NETWORK", 7))
{
/* With Networking */
- InitSafeBootMode = 1;
+ InitSafeBootMode = 2;
SafeBoot += 7;
MessageCode = BOOTING_IN_SAFEMODE_NETWORK;
}
KeyValuePartialInformation,
&KeyPartialInfo,
sizeof(KeyPartialInfo),
- &Size);
+ &Length);
if (!NT_SUCCESS(Status)) AlternateShell = FALSE;
}
#endif
/* Initialize Power Subsystem in Phase 1*/
- if (!PoInitSystem(1, AcpiTableDetected)) KeBugCheck(INTERNAL_POWER_ERROR);
+ if (!PoInitSystem(1)) KeBugCheck(INTERNAL_POWER_ERROR);
/* Initialize the Process Manager at Phase 1 */
if (!PsInitSystem(LoaderBlock)) KeBugCheck(PROCESS1_INITIALIZATION_FAILED);
ZwClose(ProcessInfo->ProcessHandle);
/* Free the initial process environment */
- Length = 0;
+ Size = 0;
ZwFreeVirtualMemory(NtCurrentProcess(),
(PVOID*)&Environment,
- &Length,
+ &Size,
MEM_RELEASE);
/* Free the initial process parameters */
- Length = 0;
+ Size = 0;
ZwFreeVirtualMemory(NtCurrentProcess(),
(PVOID*)&ProcessParameters,
- &Length,
+ &Size,
MEM_RELEASE);
/* Increase init phase */