From bdaf71496da7885893053589ef467cf1b084ce55 Mon Sep 17 00:00:00 2001 From: Mark Harfouche Date: Fri, 17 Jul 2020 17:41:47 -0400 Subject: [PATCH] force failure if soft reboot fails --- teensy_loader_cli.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/teensy_loader_cli.c b/teensy_loader_cli.c index 6e78f1c..f0dd9e5 100644 --- a/teensy_loader_cli.c +++ b/teensy_loader_cli.c @@ -129,9 +129,8 @@ int main(int argc, char **argv) wait_for_device_to_appear = 1; } if (soft_reboot_device) { - if (soft_reboot()) { - printf_verbose("Soft reboot performed\n"); - } + if (!soft_reboot()) die("Unable to perform soft reboot."); + printf_verbose("Soft reboot performed\n"); soft_reboot_device = 0; wait_for_device_to_appear = 1; }