* Sync up to trunk head (r60691).
[reactos.git] / ntoskrnl / po / poshtdwn.c
index 54e27e2..589779a 100644 (file)
@@ -54,9 +54,9 @@ PopShutdownHandler(VOID)
     else
     {
         /* Do it in text-mode */
-        for (i = 0; i < 25; i++) InbvDisplayString("\n");
+        for (i = 0; i < 25; i++) InbvDisplayString("\r\n");
         InbvDisplayString("                       ");
-        InbvDisplayString("The system may be powered off now.\n");
+        InbvDisplayString("The system may be powered off now.\r\n");
     }
 
     /* Hang the system */
@@ -132,13 +132,13 @@ PopGracefulShutdown(IN PVOID Context)
         if ((Process != PsInitialSystemProcess) && (Process != PsIdleProcess))
         {
             /* Print it */
-            DPRINT1("%15s is still RUNNING (%lx)\n", Process->ImageFileName, Process->UniqueProcessId);
+            DPRINT1("%15s is still RUNNING (%p)\n", Process->ImageFileName, Process->UniqueProcessId);
         }
 
         /* Get the next process */
         Process = PsGetNextProcess(Process);
     }
-    
+
     /* First, the HAL handles any "end of boot" special functionality */
     DPRINT1("HAL shutting down\n");
     HalEndOfBoot();
@@ -152,16 +152,17 @@ PopGracefulShutdown(IN PVOID Context)
     CmShutdownSystem();
     
     /* Note that modified pages should be written here (MiShutdownSystem) */
+#ifdef NEWCC
+       /* Flush all user files before we start shutting down IO */
+       /* This is where modified pages are written back by the IO manager */
+       CcShutdownSystem();
+#endif
 
     /* In this step, the I/O manager does last-chance shutdown notification */
     DPRINT1("I/O manager shutting down in phase 1\n"); 
     IoShutdownSystem(1);
     CcWaitForCurrentLazyWriterActivity();
 
-#ifdef NEWCC
-       CcShutdownSystem();
-#endif
-
     /* Note that here, we should broadcast the power IRP to devices */
 
     /* In this step, the HAL disables any wake timers */