[U-Boot-Users] [PATCH] Make bootretry work when command line editing is enabled
Andreas Engel
andreas.engel at ericsson.com
Wed Jan 9 17:10:56 CET 2008
Currently, when CONFIG_CMDLINE_EDITING is set, bootretry doesn't work.
This patch fixes the problem.
Signed-off-by: Andreas Engel <andreas.engel at 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')) {
More information about the U-Boot
mailing list