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 *****************************************************************/
15 /* FUNCTIONS *****************************************************************/
22 NtShutdownSystem(IN SHUTDOWN_ACTION Action
)
24 POWER_ACTION PowerAction
;
26 /* Convert to power action */
27 if (Action
== ShutdownNoReboot
)
29 PowerAction
= PowerActionShutdown
;
31 else if (Action
== ShutdownReboot
)
33 PowerAction
= PowerActionShutdownReset
;
35 else if (Action
== ShutdownPowerOff
)
37 PowerAction
= PowerActionShutdownOff
;
41 return STATUS_INVALID_PARAMETER
;
44 /* Now call the power manager */
45 DPRINT1("Setting state to: %lx\n", PowerAction
);
46 return NtSetSystemPowerState(PowerAction
,
48 POWER_ACTION_OVERRIDE_APPS
|
49 POWER_ACTION_DISABLE_WAKES
|
50 POWER_ACTION_CRITICAL
);