about summary refs log tree commit diff
path: root/src/minutils/s6-poweroff.c
blob: b3576b30a1e26f143d69ad229a52635582228d98 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* ISC license. */

#include <unistd.h>
#include <sys/reboot.h>
#include <skalibs/strerr2.h>

int main ()
{
  PROG = "s6-poweroff" ;
  sync() ;
  reboot(RB_POWER_OFF) ;
  strerr_diefu1sys(111, "reboot()") ;
}