a06e2ab395
import/switch of: init, getty, reboot, halt, shutdown, wall, last changes: . change reboot() call to netbsd prototype and args . allows pristine <utmp.h> . use clean <sys/reboot.h> instead of <minix/reboot.h> . implement TIOCSCTTY for use by getty so getty can get controlling terminal from init's child(ren) . allow NULL envp for exec Change-Id: I5ca02cb4230857140c08794bbfeba7df982c58a3
21 lines
344 B
C
21 lines
344 B
C
/* reboot.c
|
|
|
|
author: Edvard Tuinder v892231@si.hhs.NL
|
|
*/
|
|
|
|
#include <sys/cdefs.h>
|
|
#include <lib.h>
|
|
#include <unistd.h>
|
|
#include "namespace.h"
|
|
|
|
#include <string.h>
|
|
#include <sys/reboot.h>
|
|
|
|
int reboot(int how, char *bootstr)
|
|
{
|
|
message m;
|
|
|
|
memset(&m, 0, sizeof(m));
|
|
m.PM_REBOOT_HOW = how;
|
|
return _syscall(PM_PROC_NR, PM_REBOOT, &m);
|
|
}
|