summaryrefslogtreecommitdiff
path: root/src/shutdown/s6-linux-init-hpr.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2021-04-20 00:00:22 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2021-04-20 00:00:22 +0000
commit1172c1e817d26d5f9bb0ec289dd9a71aadf2759c (patch)
tree6c7e5eb2ebb255c7be81d1535559fa7c4a63af4b /src/shutdown/s6-linux-init-hpr.c
parent3bde455795bb3273922ec7be293e3911913576c2 (diff)
downloads6-linux-init-1172c1e817d26d5f9bb0ec289dd9a71aadf2759c.tar.xz
Add portability infrastructure
Diffstat (limited to 'src/shutdown/s6-linux-init-hpr.c')
-rw-r--r--src/shutdown/s6-linux-init-hpr.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/shutdown/s6-linux-init-hpr.c b/src/shutdown/s6-linux-init-hpr.c
index a874ac3..c92717c 100644
--- a/src/shutdown/s6-linux-init-hpr.c
+++ b/src/shutdown/s6-linux-init-hpr.c
@@ -6,7 +6,6 @@
#include <signal.h>
#include <errno.h>
#include <utmpx.h>
-#include <sys/reboot.h>
#include <skalibs/strerr2.h>
#include <skalibs/sgetopt.h>
@@ -14,6 +13,7 @@
#include <skalibs/tai.h>
#include <skalibs/djbunix.h>
+#include "os.h"
#include "defaults.h"
#include "hpr.h"
@@ -82,8 +82,8 @@ int main (int argc, char const *const *argv)
if (force)
{
if (dosync) sync() ;
- reboot(what == 3 ? RB_AUTOBOOT : what == 2 ? RB_POWER_OFF : RB_HALT_SYSTEM) ;
- strerr_diefu1sys(111, "reboot()") ;
+ os_reboot(what) ;
+ strerr_diefu1sys(111, "os_reboot") ;
}
if (!tain_now_g()) strerr_warnw1sys("get current time") ;