summaryrefslogtreecommitdiff
path: root/instr-daemon.c
diff options
context:
space:
mode:
Diffstat (limited to 'instr-daemon.c')
-rw-r--r--instr-daemon.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/instr-daemon.c b/instr-daemon.c
index 021eb62..ee77e82 100644
--- a/instr-daemon.c
+++ b/instr-daemon.c
@@ -14,6 +14,10 @@
#include <stdlib.h>
#include <ctype.h>
#include <glib.h>
+<<<<<<< HEAD
+#include <unistd.h>
+=======
+>>>>>>> b2c2c72d381ab1b32fa5b5fc4e890fef6c2bf1e0
#include <fcntl.h>
#define STDIN_BUF_SIZE 1024
@@ -316,6 +320,9 @@ int main(int argc, char **argv)
static gboolean periodic_poll (void)
{
if (bus_getpin (POWER_FAIL)) {
+<<<<<<< HEAD
+ //system ("/usr/bin/systemctl poweroff");
+=======
globals.Flags.shutdown_started = TRUE;
@@ -325,6 +332,7 @@ static gboolean periodic_poll (void)
LCD_clear();
LCD_write(0,0,"Power failed. Shutdown.");
+>>>>>>> b2c2c72d381ab1b32fa5b5fc4e890fef6c2bf1e0
// use plain old open to avoid any buffering etc
int enablefd = open("/proc/sys/kernel/sysrq", O_SYNC, O_RDWR);
@@ -339,8 +347,11 @@ static gboolean periodic_poll (void)
// sync disks
write(trgfd, "s\n", 2);
+<<<<<<< HEAD
+=======
// poweroff
system ("/usr/bin/systemctl poweroff -f");
+>>>>>>> b2c2c72d381ab1b32fa5b5fc4e890fef6c2bf1e0
}
Menu_Check_Buttons ();