xref: /minix3/minix/lib/libc/sys/reboot.c (revision 433d6423c39e34ec4b79c950597bb2d236f886be)
1*433d6423SLionel Sambuc /* reboot.c
2*433d6423SLionel Sambuc 
3*433d6423SLionel Sambuc    author: Edvard Tuinder  v892231@si.hhs.NL
4*433d6423SLionel Sambuc  */
5*433d6423SLionel Sambuc 
6*433d6423SLionel Sambuc #include <sys/cdefs.h>
7*433d6423SLionel Sambuc #include <lib.h>
8*433d6423SLionel Sambuc #include <unistd.h>
9*433d6423SLionel Sambuc #include "namespace.h"
10*433d6423SLionel Sambuc 
11*433d6423SLionel Sambuc #include <string.h>
12*433d6423SLionel Sambuc #include <sys/reboot.h>
13*433d6423SLionel Sambuc 
reboot(int how,char * bootstr)14*433d6423SLionel Sambuc int reboot(int how, char *bootstr)
15*433d6423SLionel Sambuc {
16*433d6423SLionel Sambuc   message m;
17*433d6423SLionel Sambuc 
18*433d6423SLionel Sambuc   memset(&m, 0, sizeof(m));
19*433d6423SLionel Sambuc   m.m_lc_pm_reboot.how = how;
20*433d6423SLionel Sambuc   return _syscall(PM_PROC_NR, PM_REBOOT, &m);
21*433d6423SLionel Sambuc }
22