* Sync up to trunk head (r64959).
[reactos.git] / ntoskrnl / po / power.c
index 88df584..cb7d2cc 100644 (file)
@@ -9,7 +9,6 @@
 
 /* INCLUDES ******************************************************************/
 
-#include "initguid.h"
 #include <ntoskrnl.h>
 #define NDEBUG
 #include <debug.h>
@@ -344,6 +343,10 @@ PoInitSystem(IN ULONG BootPhase)
     
     /* Initialize support for dope */
     KeInitializeSpinLock(&PopDopeGlobalLock);
+
+    /* Initialize support for shutdown waits and work-items */
+    PopInitShutdownList();
+
     return TRUE;
 }
 
@@ -445,17 +448,6 @@ PoShutdownBugCheck(IN BOOLEAN LogError,
                  BugCheckParameter4);
 }
 
-/*
- * @unimplemented
- */
-NTSTATUS
-NTAPI
-PoRequestShutdownEvent(OUT PVOID *Event)
-{
-    UNIMPLEMENTED;
-    return STATUS_NOT_IMPLEMENTED;
-}
-
 /*
  * @unimplemented
  */
@@ -637,19 +629,6 @@ PoUnregisterSystemState(IN PVOID StateHandle)
     UNIMPLEMENTED;
 }
 
-/*
- * @unimplemented
- */
-NTSTATUS
-NTAPI
-PoQueueShutdownWorkItem(IN PWORK_QUEUE_ITEM WorkItem)
-{
-    PAGED_CODE();
-
-    UNIMPLEMENTED;
-    return STATUS_NOT_IMPLEMENTED;
-}
-
 /*
  * @unimplemented
  */
@@ -851,7 +830,7 @@ NtSetSystemPowerState(IN POWER_ACTION SystemAction,
         {
             /* Not granted */
             DPRINT1("ERROR: Privilege not held for shutdown\n");
-            //return STATUS_PRIVILEGE_NOT_HELD; HACK!
+            return STATUS_PRIVILEGE_NOT_HELD;
         }
 
         /* Do it as a kernel-mode caller for consistency with system state */
@@ -946,7 +925,7 @@ NtSetSystemPowerState(IN POWER_ACTION SystemAction,
         }
         
         /* You should not have made it this far */
-        ASSERT(FALSE && "System is still up and running?!");
+        ASSERTMSG("System is still up and running?!", FALSE);
         break;
     }