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);
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;