summaryrefslogtreecommitdiff
path: root/instr-daemon.c
diff options
context:
space:
mode:
Diffstat (limited to 'instr-daemon.c')
-rw-r--r--instr-daemon.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/instr-daemon.c b/instr-daemon.c
index 9547df5..f155fab 100644
--- a/instr-daemon.c
+++ b/instr-daemon.c
@@ -378,26 +378,6 @@ static gboolean periodic_poll (void)
g_usleep(1000);
}
- LCD_clear();
- // 0123456789012345678901234567890123456789
- LCD_write(0,0,"PWR: Wait 10s. If still frozen, turn");
- LCD_write(1,0,"off 1min & retry.");
-
- // use plain old open to avoid any buffering etc
- int enablefd = open("/proc/sys/kernel/sysrq", O_SYNC | O_RDWR);
- int trgfd = open("/proc/sysrq-trigger", O_SYNC | O_RDWR);
-
- // enable sysrq
- write(enablefd, "1\n", 2);
- close(enablefd);
-
- // sync disks
- write(trgfd, "s\n", 2);
-
- // remount ro
- write(trgfd, "u\n", 2);
- close(trgfd);
-
// poweroff
system ("/usr/bin/systemctl poweroff -f");