2012-07-07 08:08:28 +04:00
|
|
|
/*
|
|
|
|
* reboot
|
|
|
|
*
|
|
|
|
* Reboot the system.
|
|
|
|
*/
|
2012-01-27 09:11:43 +04:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <syscall.h>
|
|
|
|
|
|
|
|
int main(int argc, char ** argv) {
|
|
|
|
printf("uid is %d\n", syscall_getuid());
|
|
|
|
if (syscall_reboot() < 0) {
|
|
|
|
printf("%s: need to be root.\n", argv[0]);
|
|
|
|
}
|
|
|
|
return 1;
|
|
|
|
}
|