From 040286cb270018cb7da57d569d1e317ff3e3d983 Mon Sep 17 00:00:00 2001 From: Willem Date: Sat, 13 Jul 2024 14:10:40 +0200 Subject: [PATCH] Added extra fail check on reboot watchdog code. --- lib/openmsx/share/scripts/fail_after.tcl | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/openmsx/share/scripts/fail_after.tcl b/lib/openmsx/share/scripts/fail_after.tcl index 6ac9783..e858ef5 100644 --- a/lib/openmsx/share/scripts/fail_after.tcl +++ b/lib/openmsx/share/scripts/fail_after.tcl @@ -65,8 +65,14 @@ proc fail_after { timeout {time_unit "time"} {fail_id "fail_after"} {fail_code 2 proc fail_after_reboot_watchdog {} { global fail_after_boot_timeout if {$fail_after_boot_timeout != 0} { - fail_after $fail_after_boot_timeout realtime err_boot 124 - after boot "fail_after_reboot_watchdog" + if {[catch {fail_after $fail_after_boot_timeout realtime err_boot 124} err_msg]} { + puts stderr "error: $err_msg" + fail_after_exit fail_after_reboot_install_error 1 + } + if {[catch {after boot "fail_after_reboot_watchdog"} err_msg]} { + puts stderr "error: $err_msg" + fail_after_exit fail_after_reboot_cycle_error 1 + } } }