summaryrefslogtreecommitdiffstats
path: root/doc
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 /doc
parent54754120637b6a7f4ff774fb199fc550bcfea1da (diff)
downloadtalos-obmc-uboot-c37207d7f51e19c17f859966f314e27cc1231801.tar.gz
talos-obmc-uboot-c37207d7f51e19c17f859966f314e27cc1231801.zip
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 'doc')
-rw-r--r--doc/README.autoboot15
1 files changed, 11 insertions, 4 deletions
diff --git a/doc/README.autoboot b/doc/README.autoboot
index e4c4186735..2042fe5c40 100644
--- a/doc/README.autoboot
+++ b/doc/README.autoboot
@@ -114,10 +114,17 @@ What they do
CONFIG_AUTOBOOT_PROMPT is displayed before the boot delay
selected by CONFIG_BOOTDELAY starts. If it is not defined
there is no output indicating that autoboot is in progress.
- If "%d" is included, it is replaced by the number of seconds
- remaining before autoboot will start, but it does not count
- down the seconds. "autoboot in %d seconds\n" is a reasonable
- prompt.
+
+ Note that CONFIG_AUTOBOOT_PROMPT is used as the (only)
+ argument to a printf() call, so it may contain '%' format
+ specifications, provided that it also includes, sepearated by
+ commas exactly like in a printf statement, the required
+ arguments. It is the responsibility of the user to select only
+ such arguments that are valid in the given context. A
+ reasonable prompt could be defined as
+
+ #define CONFIG_AUTOBOOT_PROMPT \
+ "autoboot in %d seconds\n",bootdelay
If CONFIG_AUTOBOOT_DELAY_STR or "bootdelaykey" is specified
and this string is received from console input before
OpenPOWER on IntegriCloud