Oh, and - that's the one bundled...

master
informatic 2016-01-27 02:17:29 +01:00
parent 6ed69c9df6
commit 07e60388c2
1 changed files with 5 additions and 3 deletions

View File

@ -1,8 +1,10 @@
#include <unistd.h>
#include <linux/reboot.h>
#include <sys/reboot.h>
#include <stdio.h>
int main(int argc, char *argv[])
{
reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, LINUX_REBOOT_CMD_RESTART, NULL);
return 0;
int retval = reboot(RB_AUTOBOOT);
if(retval != 0) perror("reboot failed");
return retval;
}