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));
|
2014-05-13 14:27:52 +02:00
|
|
|
m.m_lc_pm_reboot.how = how;
|
2013-11-04 22:48:08 +01:00
|
|
|
return _syscall(PM_PROC_NR, PM_REBOOT, &m);
|
2011-02-17 18:11:09 +01:00
|
|
|
}
|