[NTOS]: My SVN is haunted. Commit missing changes?
[reactos.git] / reactos / ntoskrnl / ex / init.c
index f1feaad..175fedf 100644 (file)
@@ -303,7 +303,7 @@ ExpInitNls(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
                                        KernelMode,
                                        &ExpNlsSectionPointer,
                                        NULL);
-    ZwClose(NlsSection);
+    ObCloseHandle(NlsSection, KernelMode);
     if (!NT_SUCCESS(Status))
     {
         /* Failed */
@@ -827,7 +827,7 @@ ExpInitializeExecutive(IN ULONG Cpu,
     PCHAR CommandLine, PerfMem;
     ULONG PerfMemUsed;
     PLDR_DATA_TABLE_ENTRY NtosEntry;
-    PRTL_MESSAGE_RESOURCE_ENTRY MsgEntry;
+    PMESSAGE_RESOURCE_ENTRY MsgEntry;
     ANSI_STRING CsdString;
     SIZE_T Remaining = 0;
     PCHAR RcEnd = NULL;
@@ -1240,7 +1240,7 @@ Phase1InitializationDiscard(IN PVOID Context)
     LARGE_INTEGER SystemBootTime, UniversalBootTime, OldTime, Timeout;
     BOOLEAN SosEnabled, NoGuiBoot, ResetBias = FALSE, AlternateShell = FALSE;
     PLDR_DATA_TABLE_ENTRY NtosEntry;
-    PRTL_MESSAGE_RESOURCE_ENTRY MsgEntry;
+    PMESSAGE_RESOURCE_ENTRY MsgEntry;
     PCHAR CommandLine, Y2KHackRequired, SafeBoot, Environment;
     PCHAR StringBuffer, EndBuffer, BeginBuffer, MpString = "";
     PINIT_BUFFER InitBuffer;
@@ -1612,7 +1612,7 @@ Phase1InitializationDiscard(IN PVOID Context)
             else if (!strncmp(SafeBoot, "NETWORK", 7))
             {
                 /* With Networking */
-                InitSafeBootMode = 1;
+                InitSafeBootMode = 2;
                 SafeBoot += 7;
                 MessageCode = BOOTING_IN_SAFEMODE_NETWORK;
             }
@@ -1726,7 +1726,7 @@ Phase1InitializationDiscard(IN PVOID Context)
                                          KeyValuePartialInformation,
                                          &KeyPartialInfo,
                                          sizeof(KeyPartialInfo),
-                                         &Size);
+                                         &Length);
                 if (!NT_SUCCESS(Status)) AlternateShell = FALSE;
             }
 
@@ -1878,17 +1878,17 @@ Phase1InitializationDiscard(IN PVOID Context)
     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 */