--- vrflash-0.24.orig/etxack.c
+++ vrflash-0.24/etxack.c
@@ -45,7 +45,12 @@
 
 		while(1) {
 			if((ret = read(fd, &c, 1)) != 1) {
-				vr_error("Error: ex_send read '0x%x' instead of ACK", c);
+				if(ret < 0 && errno == EAGAIN) {
+					continue;
+				}
+
+				vr_error("Error: ex_send unable to read from serial port");
+				return -1;
 			}
 			/*
 			 * Mask out parity.
@@ -58,17 +63,11 @@
 				break;
 			}
 
-			if(c == EOF) {
-				if(errno == EAGAIN) {
-					continue;
-				}
-
-				vr_error("Error: ex_send unable to read from serial port");
-				return -1;
-			}
 
 			if(c == NAK) {
 				vr_error("Error:  ex_send received NAK.  Aborting");
+			} else {
+				vr_error("Error: ex_send read '0x%x' instead of ACK", c);
 			}
 		}
 	}
