2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS kernel
4 * FILE: ntoskrnl/ex/shutdown.c
5 * PURPOSE: Power managment
7 * PROGRAMMERS: David Welch (welch@cwcom.net)
10 /* INCLUDES *****************************************************************/
17 /* FUNCTIONS *****************************************************************/
24 NtShutdownSystem(IN SHUTDOWN_ACTION Action
)
26 POWER_ACTION PowerAction
;
28 /* Convert to power action */
29 if (Action
== ShutdownNoReboot
)
31 PowerAction
= PowerActionShutdown
;
33 else if (Action
== ShutdownReboot
)
35 PowerAction
= PowerActionShutdownReset
;
37 else if (Action
== ShutdownPowerOff
)
39 PowerAction
= PowerActionShutdownOff
;
43 return STATUS_INVALID_PARAMETER
;
46 /* Now call the power manager */
47 DPRINT("Setting state to: %lx\n", PowerAction
);
48 return NtSetSystemPowerState(PowerAction
,
50 POWER_ACTION_OVERRIDE_APPS
|
51 POWER_ACTION_DISABLE_WAKES
|
52 POWER_ACTION_CRITICAL
);