This patch mainly copies and modifies files existing in the current libc implementing minix specific functions. To keep consisten with the NetBSD libc, we remove namespace stubs and we use "namespace.h" and weak links.
27 lines
485 B
C
27 lines
485 B
C
/* 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);
|
|
}
|