[MS] Add messages 2200-2249 and 3502-3507 to netmsg.dll.
[reactos.git] / ntoskrnl / ex / shutdown.c
index 40736b2..864f92c 100644 (file)
 /* INCLUDES *****************************************************************/
 
 #include <ntoskrnl.h>
+
+#define NDEBUG
 #include <debug.h>
 
+/* PRIVATE FUNCTIONS *********************************************************/
+
+VOID
+NTAPI
+ExShutdownSystem(VOID)
+{
+    /* Dereference the hard-error port and process objects */
+    if (ExpDefaultErrorPort)
+    {
+        ObDereferenceObject(ExpDefaultErrorPort);
+        ExpDefaultErrorPort = NULL;
+    }
+    if (ExpDefaultErrorPortProcess)
+    {
+        ObDereferenceObject(ExpDefaultErrorPortProcess);
+        ExpDefaultErrorPortProcess = NULL;
+    }
+}
+
 /* FUNCTIONS *****************************************************************/
 
 /*
@@ -22,7 +43,7 @@ NTAPI
 NtShutdownSystem(IN SHUTDOWN_ACTION Action)
 {
     POWER_ACTION PowerAction;
-    
+
     /* Convert to power action */
     if (Action == ShutdownNoReboot)
     {
@@ -40,9 +61,9 @@ NtShutdownSystem(IN SHUTDOWN_ACTION Action)
     {
         return STATUS_INVALID_PARAMETER;
     }
-    
+
     /* Now call the power manager */
-    DPRINT1("Setting state to: %lx\n", PowerAction);
+    DPRINT("Setting state to: %lx\n", PowerAction);
     return NtSetSystemPowerState(PowerAction,
                                  PowerSystemSleeping3,
                                  POWER_ACTION_OVERRIDE_APPS |