Skip to contentSkip to conversation

command loads broken since a while

U-Boot-Users Wolfgang Grandegger 1 participant 1 message Jun 22, 2007

lore
Share & tools
lore
#0 lore raw

Hello,

recently, I realized that the U-Boot command "loads" is broken and the attached preliminary patch fixes it:

common/cmd_load.c +2 -0
index f63b8e8..2d9e0f0 100644
@@ -240,12 +240,14 @@ read_record (char *buf, ulong len)
  			*p = c;
  		}
 
+#if 0
  	    /* Check for the console hangup (if any different from serial) */
  	    if (gd->jt[XF_getc] != getc) {
  		if (ctrlc()) {
  		    return (-1);
  		}
  	    }
+#endif
  	}
 
  	/* line too long - truncate */

The error sneaked in, when serial_getc was replaced with getc some time in the past. Can somebody tell me what the above code snippet is good for? I cannot see how to run the transfer over a line not being the console but maybe I have missed something.

Wolfgang.