
9 Jan
2008
9 Jan
'08
5:10 p.m.
Currently, when CONFIG_CMDLINE_EDITING is set, bootretry doesn't work. This patch fixes the problem.
Signed-off-by: Andreas Engel andreas.engel@ericsson.com
---
diff -urpN u-boot-1.3.1/common/main.c u-boot-local/common/main.c --- u-boot-1.3.1/common/main.c 2007-12-06 10:21:19.000000000 +0100 +++ u-boot-local/common/main.c 2008-01-09 16:42:03.000000000 +0100 @@ -710,6 +710,13 @@ static int cread_line(char *buf, unsigne
while (1) { rlen = 1; +#ifdef CONFIG_BOOT_RETRY_TIME + while (!tstc()) { /* while no incoming data */ + if (retry_time >= 0 && get_ticks() > endtime) + return (-2); /* timed out */ + } +#endif + ichar = getcmd_getch();
if ((ichar == '\n') || (ichar == '\r')) {