diff options
Diffstat (limited to 'src/main2.c')
-rw-r--r-- | src/main2.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/main2.c b/src/main2.c index b18b1ee..0d11c1b 100644 --- a/src/main2.c +++ b/src/main2.c @@ -719,16 +719,13 @@ int main(int argc, char **argv) { /* cold flash */ if ( dev_cold_flash ) { - if ( usb_dev->flash_device->protocol != FLASH_COLD ) { - usb_close_device(usb_dev); - printf_and_wait("Unplug USB cable, turn device off, press ENTER and plug USB cable again"); - continue; - } - - cold_flash(usb_dev, image_2nd, image_secondary); + ret = cold_flash(usb_dev, image_2nd, image_secondary); usb_close_device(usb_dev); usb_dev = NULL; + if ( ret != 0 ) + continue; + if ( dev_flash ) { dev_cold_flash = 0; continue; |