diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2021-04-20 00:36:22 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2021-04-20 00:36:22 +0000 |
commit | 7286b1641527a9a124425acf33ae3f67354029f1 (patch) | |
tree | 8e1b970b67bdc81e1745f291d43d5f298c51a4ab /src/os/freebsd-os_reboot.c | |
parent | 1172c1e817d26d5f9bb0ec289dd9a71aadf2759c (diff) | |
download | s6-linux-init-7286b1641527a9a124425acf33ae3f67354029f1.tar.xz |
Add base FreeBSD implementation
Diffstat (limited to 'src/os/freebsd-os_reboot.c')
-rw-r--r-- | src/os/freebsd-os_reboot.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/os/freebsd-os_reboot.c b/src/os/freebsd-os_reboot.c new file mode 100644 index 0000000..159fd97 --- /dev/null +++ b/src/os/freebsd-os_reboot.c @@ -0,0 +1,11 @@ +/* ISC license. */ + +#include <unistd.h> +#include <sys/reboot.h> + +#include "os.h" + +void os_reboot (int what) +{ + reboot(what == 3 ? RB_AUTOBOOT : what == 2 ? RB_POWEROFF : RB_HALT) ; +} |