From 9e02a7ee2335ba91e5bd0cbb79ab8a5a58f57bde Mon Sep 17 00:00:00 2001 From: root Date: Thu, 1 Jan 1970 09:01:03 +0900 Subject: file root normally read-only now, for safe power-off. Major OS changes too. --- instr-daemon.c | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'instr-daemon.c') 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"); -- cgit