summaryrefslogtreecommitdiff
path: root/common/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/main.c')
-rw-r--r--common/main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/common/main.c b/common/main.c
index 1c7d73e..163ba02 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')) {