summaryrefslogtreecommitdiff
path: root/common/hush.c
diff options
context:
space:
mode:
author <m8@hekate.semihalf.com>2005-08-16 17:34:22 +0200
committer <m8@hekate.semihalf.com>2005-08-16 17:34:22 +0200
commit22e05df45cc343eda3266312bde676737d9bc70c (patch)
tree6f2209c6675e79d000e359725872a3ba15262140 /common/hush.c
parentd4f5c72896b6b47cae276f49081a801491be6838 (diff)
parent98128f389cc318dbd1d597cf8d2d09902cddcb4b (diff)
downloadu-boot-imx-22e05df45cc343eda3266312bde676737d9bc70c.zip
u-boot-imx-22e05df45cc343eda3266312bde676737d9bc70c.tar.gz
u-boot-imx-22e05df45cc343eda3266312bde676737d9bc70c.tar.bz2
Merge with pollux.denx.org:/home/git/u-boot/.git
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 47680ed..eb7f7f1 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;