From 89ff4582f88a710e7bbe1cb7410593ee35216535 Mon Sep 17 00:00:00 2001 From: Piotr Dymacz Date: Mon, 10 Feb 2014 00:25:42 +0100 Subject: [PATCH] Dont show boot delay info if boot delay is 0s --- u-boot/common/main.c | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/u-boot/common/main.c b/u-boot/common/main.c index 47de5a9..0ae2c4d 100755 --- a/u-boot/common/main.c +++ b/u-boot/common/main.c @@ -64,38 +64,40 @@ static __inline__ int abortboot(int bootdelay){ } #endif + if(bootdelay > 0){ #ifdef CONFIG_MENUPROMPT - printf(CONFIG_MENUPROMPT, bootdelay); + printf(CONFIG_MENUPROMPT, bootdelay); #else - printf("Hit any key to stop autoboot: %d ", bootdelay); + printf("Hit any key to stop autoboot: %d ", bootdelay); #endif - while((bootdelay > 0) && (!abort)){ - int i; + while((bootdelay > 0) && (!abort)){ + int i; - --bootdelay; + --bootdelay; - /* delay 100 * 10ms */ - for(i = 0; !abort && i < 100; ++i){ + /* delay 100 * 10ms */ + for(i = 0; !abort && i < 100; ++i){ - /* we got a key press */ - if(tstc()){ - /* don't auto boot */ - abort = 1; - /* no more delay */ - bootdelay = 0; - /* consume input */ - (void) getc(); - break; + /* we got a key press */ + if(tstc()){ + /* don't auto boot */ + abort = 1; + /* no more delay */ + bootdelay = 0; + /* consume input */ + (void) getc(); + break; + } + udelay(10000); } - udelay(10000); + + printf("\b\b%d ", bootdelay); } - printf("\b\b%d ", bootdelay); + printf("\n\n"); } - printf("\n\n"); - #ifdef CONFIG_SILENT_CONSOLE if(abort){ /* permanently enable normal console output */ -- 2.25.1