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
@@ -27,13 +27,8 @@
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <sys/reboot.h>
#include "util.h"
#ifndef RB_SW_SUSPEND /* Since Linux 2.5.18, but not in GLIBC until 2.19 */
#define RB_SW_SUSPEND 0xd000fce2
#endif
typedef enum {
CMD_UNKNOWN = -1,
CMD_REBOOT = 0,