Files
haiku-beta6/src/kernel/core/shutdown.c
T

33 lines
439 B
C
Raw Normal View History

2004-11-25 17:59:13 +00:00
/*
* Copyright 2004, Axel Dörfler, [email protected]. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#include <kernel.h>
#include <syscalls.h>
status_t
shutdown(bool reboot)
{
// ToDo: shutdown all system services!
sync();
return arch_cpu_shutdown(reboot);
}
// #pragma mark -
status_t
_user_shutdown(bool reboot)
{
2004-11-28 23:13:22 +00:00
if (geteuid() != 0)
return B_NOT_ALLOWED;
2004-11-25 17:59:13 +00:00
return shutdown(reboot);
}
2004-11-28 23:13:22 +00:00