diff --git a/fastboot.c b/fastboot.c index 2a97205..ba6dba9 100644 --- a/fastboot.c +++ b/fastboot.c @@ -375,8 +375,10 @@ int fastboot_download(struct fastboot *fb, const void *data, size_t len) fastboot_write(fb, cmd, n); n = fastboot_read(fb, buf, MAX_USBFS_BULK_SIZE); - if (n < 0) - errx(1, "remote rejected download request"); + if (n < 0) { + fprintf(stderr, "remote rejected download request\n"); + return -1; + } while (len > 0) { xfer = MIN(len, MAX_USBFS_BULK_SIZE);