Sync with trunk (r48545)
[reactos.git] / ntoskrnl / ex / init.c
index fed59bc..b44b589 100644 (file)
@@ -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;
@@ -1044,7 +1044,7 @@ ExpInitializeExecutive(IN ULONG Cpu,
         if (NT_SUCCESS(Status))
         {
             /* Setup the string */
-            RtlInitAnsiString(&CsdString, MsgEntry->Text);
+            RtlInitAnsiString(&CsdString, (PCHAR)MsgEntry->Text);
 
             /* Remove trailing newline */
             while ((CsdString.Length > 0) &&
@@ -1230,6 +1230,8 @@ ExpInitializeExecutive(IN ULONG Cpu,
     SharedUserData->ImageNumberHigh = IMAGE_FILE_MACHINE_ARCHITECTURE;
 }
 
+extern BOOLEAN AllowPagedPool;
+
 VOID
 NTAPI
 Phase1InitializationDiscard(IN PVOID Context)
@@ -1240,7 +1242,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;
@@ -1371,7 +1373,7 @@ Phase1InitializationDiscard(IN PVOID Context)
         /* Create the banner message */
         Status = RtlStringCbPrintfA(EndBuffer,
                                     Size,
-                                    MsgEntry->Text,
+                                    (PCHAR)MsgEntry->Text,
                                     StringBuffer,
                                     NtBuildNumber & 0xFFFF,
                                     BeginBuffer);
@@ -1486,7 +1488,7 @@ Phase1InitializationDiscard(IN PVOID Context)
     Status = RtlStringCbPrintfA(StringBuffer,
                                 256,
                                 NT_SUCCESS(MsgStatus) ?
-                                MsgEntry->Text :
+                                (PCHAR)MsgEntry->Text :
                                 "%u System Processor [%u MB Memory] %Z\n",
                                 KeNumberProcessors,
                                 Size,
@@ -1612,7 +1614,7 @@ Phase1InitializationDiscard(IN PVOID Context)
             else if (!strncmp(SafeBoot, "NETWORK", 7))
             {
                 /* With Networking */
-                InitSafeBootMode = 1;
+                InitSafeBootMode = 2;
                 SafeBoot += 7;
                 MessageCode = BOOTING_IN_SAFEMODE_NETWORK;
             }
@@ -1650,7 +1652,7 @@ Phase1InitializationDiscard(IN PVOID Context)
             if (NT_SUCCESS(Status))
             {
                 /* Display it */
-                InbvDisplayString(MsgEntry->Text);
+                InbvDisplayString((PCHAR)MsgEntry->Text);
             }
         }
     }
@@ -1670,7 +1672,7 @@ Phase1InitializationDiscard(IN PVOID Context)
             if (NT_SUCCESS(Status))
             {
                 /* Display it */
-                InbvDisplayString(MsgEntry->Text);
+                InbvDisplayString((PCHAR)MsgEntry->Text);
             }
 
             /* Setup boot logging */
@@ -1849,6 +1851,9 @@ Phase1InitializationDiscard(IN PVOID Context)
     /* Update progress bar */
     InbvUpdateProgressBar(90);
 
+    /* Enough fun for now */
+    AllowPagedPool = FALSE;
+
     /* Launch initial process */
     ProcessInfo = &InitBuffer->ProcessInfo;
     ExpLoadInitialProcess(InitBuffer, &ProcessParameters, &Environment);