From 73cff35173dd75b0254ae7cf9098c32822859de0 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Tue, 16 Apr 2019 20:37:01 +0000 Subject: It builds! Tomorrow: skeletons for stage2, stage3 and runlevel scripts. --- src/shutdown/hpr_shutdown.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/shutdown/hpr_shutdown.c (limited to 'src/shutdown/hpr_shutdown.c') diff --git a/src/shutdown/hpr_shutdown.c b/src/shutdown/hpr_shutdown.c new file mode 100644 index 0000000..9c9ff51 --- /dev/null +++ b/src/shutdown/hpr_shutdown.c @@ -0,0 +1,16 @@ +/* ISC license. */ + +#include + +#include +#include + +#include "hpr.h" + +int hpr_shutdown (unsigned int what, tain_t const *when, unsigned int grace) +{ + char pack[5 + TAIN_PACK] = { " hpr"[what] } ; + tain_pack(pack+1, when) ; + uint32_pack_big(pack + 1 + TAIN_PACK, (uint32_t)grace) ; + return hpr_send(pack, 5 + TAIN_PACK) ; +} -- cgit v1.3.1