summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2008-07-16 16:38:59 +0200
committerWolfgang Denk <wd@denx.de>2008-07-31 17:08:27 +0200
commitc37207d7f51e19c17f859966f314e27cc1231801 (patch)
treea872cd09a894e62514c928a82e6771b0e37d00ca /common
parent54754120637b6a7f4ff774fb199fc550bcfea1da (diff)
downloadu-boot-imx-c37207d7f51e19c17f859966f314e27cc1231801.zip
u-boot-imx-c37207d7f51e19c17f859966f314e27cc1231801.tar.gz
u-boot-imx-c37207d7f51e19c17f859966f314e27cc1231801.tar.bz2
Fix printf() format problems with configurable prompts
U-Boot allows for configurable prompt strings using the CONFIG_AUTOBOOT_PROMPT resp. CONFIG_MENUPROMPT definitions. So far, the assumption was that any such user defined problts would contain exactly one "%d" format specifier. But some boards did not. To allow for flexible boot prompts without adding too complex code we now allow to specify the whole list of printf() arguments in the user definition. This is powerful, but requires a responsible user who really understands what he is doing, as he needs to know for exanple which variables are available in the respective context. Signed-off-by: Wolfgang Denk <wd@denx.de>
Diffstat (limited to 'common')
-rw-r--r--common/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/main.c b/common/main.c
index 79ad291..187ef8a 100644
--- a/common/main.c
+++ b/common/main.c
@@ -116,7 +116,7 @@ static __inline__ int abortboot(int bootdelay)
u_int i;
# ifdef CONFIG_AUTOBOOT_PROMPT
- printf(CONFIG_AUTOBOOT_PROMPT, bootdelay);
+ printf(CONFIG_AUTOBOOT_PROMPT);
# endif
# ifdef CONFIG_AUTOBOOT_DELAY_STR
@@ -212,7 +212,7 @@ static __inline__ int abortboot(int bootdelay)
int abort = 0;
#ifdef CONFIG_MENUPROMPT
- printf(CONFIG_MENUPROMPT, bootdelay);
+ printf(CONFIG_MENUPROMPT);
#else
printf("Hit any key to stop autoboot: %2d ", bootdelay);
#endif