summaryrefslogtreecommitdiff
path: root/README
diff options
context:
space:
mode:
authorSonny Rao <sonnyrao@chromium.org>2011-11-02 09:52:08 +0000
committerWolfgang Denk <wd@denx.de>2011-12-17 23:33:20 +0100
commit046a37bd53f479915bcd5041e0834dad576371a2 (patch)
treeb869392a16be5b8a3313e4c20e5b10a871329a3d /README
parent9785c905cff109e48415904e518ca559918e7fd0 (diff)
downloadu-boot-046a37bd53f479915bcd5041e0834dad576371a2.tar.gz
Add safe vsnprintf and snprintf library functions
From: Sonny Rao <sonnyrao@chromium.org> These functions are useful in U-Boot because they allow a graceful failure rather than an unpredictable stack overflow when printf() buffers are exceeded. Mostly copied from the Linux kernel. I copied vscnprintf and scnprintf so we can change printf and vprintf to use the safe implementation but still return the correct values. (Simon Glass <sjg@chromium.org> modified this commit a little) Signed-off-by: Sonny Rao <sonnyrao@chromium.org>
Diffstat (limited to 'README')
-rw-r--r--README9
1 files changed, 9 insertions, 0 deletions
diff --git a/README b/README
index 6fe1e0fc2d..7916777797 100644
--- a/README
+++ b/README
@@ -655,6 +655,15 @@ The following options need to be configured:
to get the character out. Baud rates will need to default
to something sensible.
+- Safe printf() functions
+ Define CONFIG_SYS_VSNPRINTF to compile in safe versions of
+ the printf() functions. These are defined in
+ include/vsprintf.h and include snprintf(), vsnprintf() and
+ so on. Code size increase is approximately 300-500 bytes.
+ If this option is not given then these functions will
+ silently discard their buffer size argument - this means
+ you are not getting any overflow checking in this case.
+
- Boot Delay: CONFIG_BOOTDELAY - in seconds
Delay before automatically booting the default image;
set to -1 to disable autoboot.