2013-11-04 22:48:08 +01:00
|
|
|
/* reboot.c
|
2011-02-17 18:11:09 +01:00
|
|
|
|
|
|
|
author: Edvard Tuinder v892231@si.hhs.NL
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <sys/cdefs.h>
|
|
|
|
#include <lib.h>
|
2013-05-31 22:37:25 +02:00
|
|
|
#include <unistd.h>
|
2011-02-17 18:11:09 +01:00
|
|
|
#include "namespace.h"
|
|
|
|
|
2013-11-04 22:48:08 +01:00
|
|
|
#include <string.h>
|
2011-02-17 18:11:09 +01:00
|
|
|
#include <sys/reboot.h>
|
|
|
|
|
2013-09-09 15:20:18 +02:00
|
|
|
int reboot(int how, char *bootstr)
|
2011-02-17 18:11:09 +01:00
|
|
|
{
|
|
|
|
message m;
|
|
|
|
|
2013-11-04 22:48:08 +01:00
|
|
|
memset(&m, 0, sizeof(m));
|
|
|
|
m.PM_REBOOT_HOW = how;
|
|
|
|
return _syscall(PM_PROC_NR, PM_REBOOT, &m);
|
2011-02-17 18:11:09 +01:00
|
|
|
}
|