Skip to content

Commit

Permalink
dfu_load: Return success if device is gone after manifest-wait-reset
Browse files Browse the repository at this point in the history
Even if this condition was specifically meant to be ignored, the
libusb error was propagating back to main and used as exit code.

(Not that any DFU-compliant device should report being in the
dfuMANIFEST-WAIT-RESET state though.)

Thanks to Andreas Rosvall for initial patch.

https://sourceforge.net/p/dfu-util/tickets/169/

Signed-off-by: Tormod Volden <[email protected]>
  • Loading branch information
tormodvolden committed Apr 14, 2024
1 parent 1eb7185 commit 83b4abc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/dfu_load.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,8 @@ int dfuload_do_dnload(struct dfu_if *dif, int xfer_size, struct dfu_file *file)
if (ret < 0 && ret != LIBUSB_ERROR_NOT_FOUND) {
fprintf(stderr, "error resetting after download (%s)\n",
libusb_error_name(ret));
} else {
ret = 0;
}
break;
case DFU_STATE_dfuIDLE:
Expand Down

0 comments on commit 83b4abc

Please sign in to comment.