minix/lib/libc/sys-minix/reboot.c

28 lines
485 B
C
Raw Normal View History

/* reboot.c - Systemcall interface to mm/signal.c::do_reboot()
author: Edvard Tuinder v892231@si.hhs.NL
*/
#include <sys/cdefs.h>
#include <lib.h>
#include "namespace.h"
#include <unistd.h>
#include <sys/reboot.h>
#include <stdarg.h>
int reboot(int how, ...)
{
message m;
va_list ap;
va_start(ap, how);
if ((m.m1_i1 = how) == RBT_MONITOR) {
m.m1_p1 = va_arg(ap, char *);
m.m1_i2 = va_arg(ap, size_t);
}
va_end(ap);
return _syscall(PM_PROC_NR, REBOOT, &m);
}