From: Michael Gernoth Date: Sat, 15 Feb 2014 16:09:13 +0000 (+0100) Subject: ETIMEDOUT is not a fatal error X-Git-Tag: v0.100~37 X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/hmcfgusb/commitdiff_plain/bedcaba0bd60f3ae0856fe75bf4c81c2087c0baa?hp=bafd75c9511de5b554fb222331b88518ed2ee96e ETIMEDOUT is not a fatal error --- diff --git a/firmware.c b/firmware.c index bd13dbe..ff4c8be 100644 --- a/firmware.c +++ b/firmware.c @@ -119,7 +119,6 @@ struct firmware* firmware_read_firmware(char *filename, int debug) len |= (ascii_to_nibble(buf[2]) & 0xf)<< 4; len |= ascii_to_nibble(buf[3]) & 0xf; - /* This might be wrong, but it works for current fw->fw */ if (len > MAX_BLOCK_LENGTH) { fprintf(stderr, "Invalid block-length %u > %u for block %d!\n", len, MAX_BLOCK_LENGTH, fw->fw_blocks+1); exit(EXIT_FAILURE); diff --git a/flash-hmcfgusb.c b/flash-hmcfgusb.c index 571386f..244559d 100644 --- a/flash-hmcfgusb.c +++ b/flash-hmcfgusb.c @@ -138,8 +138,10 @@ int main(int argc, char **argv) errno = 0; pfd = hmcfgusb_poll(dev, 1); if ((pfd < 0) && errno) { - perror("\n\nhmcfgusb_poll"); - exit(EXIT_FAILURE); + if (errno != ETIMEDOUT) { + perror("\n\nhmcfgusb_poll"); + exit(EXIT_FAILURE); + } } if (rdata.ack) { break;