From 1172c1e817d26d5f9bb0ec289dd9a71aadf2759c Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Tue, 20 Apr 2021 00:00:22 +0000 Subject: Add portability infrastructure --- src/os/linux-os_reboot.c | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/os/linux-os_reboot.c (limited to 'src/os/linux-os_reboot.c') 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 + +#include "os.h" + +void os_reboot (int what) +{ + reboot(what == 3 ? RB_AUTOBOOT : what == 2 ? RB_POWER_OFF : RB_HALT_SYSTEM) ; +} -- cgit v1.3.1