]> cvs.zerfleddert.de Git - hmcfgusb/commitdiff
ETIMEDOUT is not a fatal error
authorMichael Gernoth <michael@gernoth.net>
Sat, 15 Feb 2014 16:09:13 +0000 (17:09 +0100)
committerMichael Gernoth <michael@gernoth.net>
Sat, 15 Feb 2014 16:09:13 +0000 (17:09 +0100)
firmware.c
flash-hmcfgusb.c

index bd13dbe2fb3bbf3b0085347b5ac5003967445260..ff4c8bece316181327e3b140d2507175f2d8376c 100644 (file)
@@ -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);
index 571386f8b1bc5e49acc84c84ef0d4444dac9c499..244559d6e1d61dc1cf7bd499376f1db3a80ec06b 100644 (file)
@@ -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;
Impressum, Datenschutz