zsun-fw-tools/minreboot.c

18 lines
290 B
C
Raw Normal View History

2016-01-28 21:25:56 +00:00
/**
* Minimal reboot binary
*
* Build with:
* gcc minreboot.c -o minreboot -static -s
*/
2016-01-27 01:08:18 +00:00
#include <unistd.h>
2016-01-27 01:17:29 +00:00
#include <sys/reboot.h>
#include <stdio.h>
2016-01-27 01:08:18 +00:00
int main(int argc, char *argv[])
{
2016-01-27 01:17:29 +00:00
int retval = reboot(RB_AUTOBOOT);
if(retval != 0) perror("reboot failed");
return retval;
2016-01-27 01:08:18 +00:00
}