summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorJoe Hershberger <joe.hershberger@ni.com>2012-08-17 10:53:12 +0000
committerTom Rini <trini@ti.com>2012-10-03 16:01:21 -0700
commit93d7212fa6a7fa5ef01927c13ab360d1a4d6e95b (patch)
treef99cc9fa6e2079e7853f33d3d3158e244039d80b /common
parente53515a21c50e28393d2e4ff5bd438f9ba9e0cee (diff)
downloadu-boot-imx-93d7212fa6a7fa5ef01927c13ab360d1a4d6e95b.zip
u-boot-imx-93d7212fa6a7fa5ef01927c13ab360d1a4d6e95b.tar.gz
u-boot-imx-93d7212fa6a7fa5ef01927c13ab360d1a4d6e95b.tar.bz2
Allow runtime configuration of "zero-delay" check
Define the new "-2" value for bootdelay to mean autoboot with no delay and don't check for an abort key (while "0" value means do check). Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'common')
-rw-r--r--common/main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/common/main.c b/common/main.c
index 81984ac..9507cec 100644
--- a/common/main.c
+++ b/common/main.c
@@ -222,7 +222,8 @@ int abortboot(int bootdelay)
#ifdef CONFIG_MENUPROMPT
printf(CONFIG_MENUPROMPT);
#else
- printf("Hit any key to stop autoboot: %2d ", bootdelay);
+ if (bootdelay >= 0)
+ printf("Hit any key to stop autoboot: %2d ", bootdelay);
#endif
#if defined CONFIG_ZERO_BOOTDELAY_CHECK
@@ -382,7 +383,7 @@ void main_loop (void)
debug ("### main_loop: bootcmd=\"%s\"\n", s ? s : "<UNDEFINED>");
- if (bootdelay >= 0 && s && !abortboot (bootdelay)) {
+ if (bootdelay != -1 && s && !abortboot(bootdelay)) {
# ifdef CONFIG_AUTOBOOT_KEYED
int prev = disable_ctrlc(1); /* disable Control C checking */
# endif