Add reboot/halt/poweroff/suspend commands to Finit API

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg committed 2021-02-21 10:49:13 +01:00
1 parent e80edbb401
commit 649a269526
4 files changed
+59 -5

No files matched your search

+5
View File
@@ -28,9 +28,14 @@
#ifdef HAVE_TERMIOS_H /* for screen_width() */
#include <poll.h>
#include <stdio.h>
#include <sys/reboot.h>
#include <termios.h>
#endif
#ifndef RB_SW_SUSPEND /* Since Linux 2.5.18, but not in GLIBC until 2.19 */
#define RB_SW_SUSPEND 0xd000fce2
#endif
extern int screen_rows;
extern int screen_cols;
extern char *prognm;