summaryrefslogtreecommitdiffstats
path: root/common/hush.c
diff options
context:
space:
mode:
authorWolfgang Denk <wd@pollux.denx.de>2005-08-12 23:55:10 +0200
committerWolfgang Denk <wd@pollux.denx.de>2005-08-12 23:55:10 +0200
commit55d150d95dbd4612f229e1f503c3a6aa8ed08a96 (patch)
treee8b755c6b0c5d56c8d8777236baab8b1deb67451 /common/hush.c
parent2191923072413972d8dbf3e1b2f8ce6762a85800 (diff)
parent90e4e7836596d8ae5cead41a776b2b95c84182c6 (diff)
downloadu-boot-55d150d95dbd4612f229e1f503c3a6aa8ed08a96.tar.gz
u-boot-55d150d95dbd4612f229e1f503c3a6aa8ed08a96.tar.xz
u-boot-55d150d95dbd4612f229e1f503c3a6aa8ed08a96.zip
Merge with /home/wd/git/u-boot/master
Diffstat (limited to 'common/hush.c')
-rw-r--r--common/hush.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/common/hush.c b/common/hush.c
index 47680edec3..eb7f7f1560 100644
--- a/common/hush.c
+++ b/common/hush.c
@@ -1022,12 +1022,30 @@ static void get_user_input(struct in_str *i)
int n;
static char the_command[CFG_CBSIZE];
+#ifdef CONFIG_BOOT_RETRY_TIME
+# ifdef CONFIG_RESET_TO_RETRY
+ extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
+# else
+# error "This currently only works with CONFIG_RESET_TO_RETRY enabled"
+# endif
+ reset_cmd_timeout();
+#endif
i->__promptme = 1;
if (i->promptmode == 1) {
n = readline(CFG_PROMPT);
} else {
n = readline(CFG_PROMPT_HUSH_PS2);
}
+#ifdef CONFIG_BOOT_RETRY_TIME
+ if (n == -2) {
+ puts("\nTimeout waiting for command\n");
+# ifdef CONFIG_RESET_TO_RETRY
+ do_reset(NULL, 0, 0, NULL);
+# else
+# error "This currently only works with CONFIG_RESET_TO_RETRY enabled"
+# endif
+ }
+#endif
if (n == -1 ) {
flag_repeat = 0;
i->__promptme = 0;