diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2021-04-20 00:00:22 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2021-04-20 00:00:22 +0000 |
commit | 1172c1e817d26d5f9bb0ec289dd9a71aadf2759c (patch) | |
tree | 6c7e5eb2ebb255c7be81d1535559fa7c4a63af4b /src/shutdown | |
parent | 3bde455795bb3273922ec7be293e3911913576c2 (diff) | |
download | s6-linux-init-1172c1e817d26d5f9bb0ec289dd9a71aadf2759c.tar.xz |
Add portability infrastructure
Diffstat (limited to 'src/shutdown')
-rw-r--r-- | src/shutdown/deps-exe/s6-linux-init-hpr | 1 | ||||
-rw-r--r-- | src/shutdown/s6-linux-init-hpr.c | 6 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/shutdown/deps-exe/s6-linux-init-hpr b/src/shutdown/deps-exe/s6-linux-init-hpr index 454a027..e556641 100644 --- a/src/shutdown/deps-exe/s6-linux-init-hpr +++ b/src/shutdown/deps-exe/s6-linux-init-hpr @@ -1,4 +1,5 @@ libhpr.a.xyzzy +libos-${OS}.a.xyzzy ${LIBUTMPS} -lskarnet ${SYSCLOCK_LIB} 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") ; |