mirror of
https://github.com/reactos/reactos.git
synced 2024-10-20 08:01:05 +00:00
Make the end a little bit more interesting
svn path=/trunk/; revision=10834
This commit is contained in:
parent
ba5fcd9590
commit
556c9464b6
|
@ -31,9 +31,20 @@ NtSetSystemPowerState(IN POWER_ACTION SystemAction,
|
||||||
NTSTATUS STDCALL
|
NTSTATUS STDCALL
|
||||||
NtShutdownSystem(IN SHUTDOWN_ACTION Action)
|
NtShutdownSystem(IN SHUTDOWN_ACTION Action)
|
||||||
{
|
{
|
||||||
|
static PCH FamousLastWords[] =
|
||||||
|
{
|
||||||
|
"Oh my God, they killed Kenny! Those bastards!\n",
|
||||||
|
"Goodbye, and thanks for all the fish\n",
|
||||||
|
"I'll be back\n"
|
||||||
|
};
|
||||||
|
LARGE_INTEGER Now;
|
||||||
|
|
||||||
if (Action > ShutdownPowerOff)
|
if (Action > ShutdownPowerOff)
|
||||||
return STATUS_INVALID_PARAMETER;
|
return STATUS_INVALID_PARAMETER;
|
||||||
|
|
||||||
|
ZwQuerySystemTime(&Now);
|
||||||
|
Now.u.LowPart = Now.u.LowPart >> 8; /* Seems to give a somewhat better "random" number */
|
||||||
|
|
||||||
IoShutdownRegisteredDevices();
|
IoShutdownRegisteredDevices();
|
||||||
CmShutdownRegistry();
|
CmShutdownRegistry();
|
||||||
IoShutdownRegisteredFileSystems();
|
IoShutdownRegisteredFileSystems();
|
||||||
|
@ -43,6 +54,8 @@ NtShutdownSystem(IN SHUTDOWN_ACTION Action)
|
||||||
|
|
||||||
if (Action == ShutdownNoReboot)
|
if (Action == ShutdownNoReboot)
|
||||||
{
|
{
|
||||||
|
HalReleaseDisplayOwnership();
|
||||||
|
HalDisplayString(FamousLastWords[Now.u.LowPart % (sizeof(FamousLastWords) / sizeof(PCH))]);
|
||||||
#if 0
|
#if 0
|
||||||
/* Switch off */
|
/* Switch off */
|
||||||
HalReturnToFirmware (FIRMWARE_OFF);
|
HalReturnToFirmware (FIRMWARE_OFF);
|
||||||
|
|
Loading…
Reference in a new issue