aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErwan Velu <erwan.velu@zodiacaerospace.com>2012-09-10 17:35:13 +0200
committerErwan Velu <erwanaliasr1@gmail.com>2012-09-10 20:20:25 +0200
commit0d254b0e4d19cdac49348e34bfda3a358eee47f5 (patch)
tree430b47c3e5d7db57f0571f22e3cb823cff7640b5
parentbdc83b0e517fbb662e8d8b02c5cf638c460dfffc (diff)
downloadsyslinux-0d254b0e4d19cdac49348e34bfda3a358eee47f5.tar.gz
syslinux-0d254b0e4d19cdac49348e34bfda3a358eee47f5.tar.xz
syslinux-0d254b0e4d19cdac49348e34bfda3a358eee47f5.zip
kontron_wdt: Adjusting exit path
If we fail, at least let's boot the expected image
-rw-r--r--com32/modules/kontron_wdt.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/com32/modules/kontron_wdt.c b/com32/modules/kontron_wdt.c
index 46d37d0f..6d21d7c2 100644
--- a/com32/modules/kontron_wdt.c
+++ b/com32/modules/kontron_wdt.c
@@ -380,28 +380,31 @@ int main(int argc, const char *argv[]) {
if (status & KEMPLD_WDT_CFG_ENABLE) {
kempld_wdt_keepalive(&wdt);
} else {
- ret = kempld_wdt_settimeout(&wdt);
+ ret = kempld_wdt_settimeout(&wdt);
if (ret) {
printf("Unable to setup timeout !\n");
- kempld_release_mutex(&pld);
- return -1;
+ goto booting;
}
- ret = kempld_wdt_start(&wdt);
+
+ ret = kempld_wdt_start(&wdt);
if (ret) {
printf("Unable to start watchdog !\n");
- kempld_release_mutex(&pld);
- return -1;
+ goto booting;
}
}
+ printf("Watchog armed ! Rebooting in %d seconds if no feed occurs !\n",wdt.timeout);
+
+booting:
/* Release Mutex to let Linux's Driver taking control */
kempld_release_mutex(&pld);
- printf("Watchog armed ! Rebooting in %d seconds if no feed occurs !\n",wdt.timeout);
/* Let's boot the default entry if specified */
if (strlen(default_label)>0) {
printf("Executing default label = '%s'\n",default_label);
syslinux_run_command(default_label);
+ } else {
+ return ret;
}
}