diff options
author | root <root@avtech.domain.avtechpulse.com> | 1970-01-01 09:01:03 +0900 |
---|---|---|
committer | root <root@avtech.domain.avtechpulse.com> | 1970-01-01 09:01:03 +0900 |
commit | 9e02a7ee2335ba91e5bd0cbb79ab8a5a58f57bde (patch) | |
tree | c41616f855d66609896236dfefb63defcff53f33 /instr-daemon.c | |
parent | 5d5d9873f31ae857e0cd713f529f12407a6936a1 (diff) |
file root normally read-only now, for safe power-off. Major OS changes too.INSTRUMENT_6_2_00
Diffstat (limited to 'instr-daemon.c')
-rw-r--r-- | instr-daemon.c | 20 |
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"); |