summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorAndreas Engel <andreas.engel@ericsson.com>2008-01-09 17:10:56 +0100
committerWolfgang Denk <wd@denx.de>2008-01-12 21:14:14 +0100
commit00ac50e348d1bace27a174b7f528d113bc7cdf7f (patch)
tree66430a6927b3c7bc773fc945f3d24c4080d2d8b0 /common
parent632de0672d3c3ab53ad798c47f5f1eb26008a0e4 (diff)
downloadu-boot-00ac50e348d1bace27a174b7f528d113bc7cdf7f.tar.gz
Make bootretry work when command line editing is enabled
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>
Diffstat (limited to 'common')
-rw-r--r--common/main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/common/main.c b/common/main.c
index 1c7d73e5db..163ba02e62 100644
--- a/common/main.c
+++ b/common/main.c
@@ -709,6 +709,13 @@ static int cread_line(const char *const prompt, char *buf, unsigned int *len)
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')) {