diff options
Diffstat (limited to 'src/os/linux-os_reboot.c')
-rw-r--r-- | src/os/linux-os_reboot.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/os/linux-os_reboot.c b/src/os/linux-os_reboot.c new file mode 100644 index 0000000..fb41584 --- /dev/null +++ b/src/os/linux-os_reboot.c @@ -0,0 +1,10 @@ +/* ISC license. */ + +#include <sys/reboot.h> + +#include "os.h" + +void os_reboot (int what) +{ + reboot(what == 3 ? RB_AUTOBOOT : what == 2 ? RB_POWER_OFF : RB_HALT_SYSTEM) ; +} |