diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2017-10-14 00:35:47 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2017-10-15 21:05:08 -0400 |
commit | 1c59a0d30a0ff986f020a89de9753c503c65f592 (patch) | |
tree | e15e84681ff2044fc8abbd8d6ac9e38a9551283f | |
parent | d222ec102452790a07d27adfb297117b83d135bb (diff) | |
download | kutter-1c59a0d30a0ff986f020a89de9753c503c65f592.tar.gz kutter-1c59a0d30a0ff986f020a89de9753c503c65f592.tar.xz kutter-1c59a0d30a0ff986f020a89de9753c503c65f592.zip |
linux: Open watchdog device after console
Only open the watchdog device after the console has been opened. The
machine should not reboot in the unlikely event the console can't be
opened.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
-rw-r--r-- | src/linux/main.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/linux/main.c b/src/linux/main.c index 55d7ec54..2be96535 100644 --- a/src/linux/main.c +++ b/src/linux/main.c @@ -77,21 +77,19 @@ main(int argc, char **argv) } // Initial setup - if (watchdog) { - int ret = watchdog_setup(); - if (ret) - return ret; - } - if (realtime) { int ret = realtime_setup(); if (ret) return ret; } - int ret = console_setup("/tmp/klipper_host_mcu"); if (ret) return -1; + if (watchdog) { + int ret = watchdog_setup(); + if (ret) + return ret; + } // Main loop sched_main(); |