summaryrefslogtreecommitdiff
path: root/src/state/hpr.h
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2019-03-02 09:41:24 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2019-03-02 09:41:24 +0000
commit23fba266a9454ee6ca095b7f6eccf523f6526607 (patch)
tree7350fdaba49b1529a13d50f6396aea35f340954d /src/state/hpr.h
parent54d0dc0990f13a86680fa55c623f0570853749ac (diff)
downloads6-linux-init-23fba266a9454ee6ca095b7f6eccf523f6526607.tar.xz
Save pending changes in 1.0.0.0 branch
Diffstat (limited to 'src/state/hpr.h')
-rw-r--r--src/state/hpr.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/state/hpr.h b/src/state/hpr.h
new file mode 100644
index 0000000..9deb6c4
--- /dev/null
+++ b/src/state/hpr.h
@@ -0,0 +1,22 @@
+/* ISC license. */
+
+#ifndef HPR_H
+#define HPR_H
+
+#include <stddef.h>
+
+#include <skalibs/tai.h>
+#include <skalibs/djbunix.h>
+
+#include "initctl.h"
+
+#define HPR_WALL_BANNER "\n\n*** WARNING ***\nThe system is going down in "
+
+#define hpr_send(s, n) openwritenclose_unsafe(INITCTL, (s), n)
+#define hpr_cancel() hpr_send("c", 1)
+extern int hpr_shutdown (unsigned int, tain_t const *, unsigned int) ;
+extern size_t hpr_fmttime (char *, size_t, unsigned int) ;
+extern void hpr_wall (char const *) ;
+extern void hpr_wall_seconds (unsigned int) ;
+
+#endif