1
0
Fork 0
Commit Graph

4 Commits (d84eb856c4385c90f4f68594819744b638f77a02)

Author SHA1 Message Date
Simon Glass b8bcaa3ad3 Add function to print a number with grouped digits
Move bootstage's numbering printing code into a generic place so that it can
be used by tracing also.

Signed-off-by: Simon Glass <sjg@chromium.org>
2013-06-26 10:16:41 -04:00
Simon Glass 71ec92b67c vsprintf: Move function documentation into header file
Now that this is not in common.h, perhaps it is acceptable to move this
documentation into the header file.

Signed-off-by: Simon Glass <sjg@chromium.org>
2011-12-17 23:34:01 +01:00
Sonny Rao 046a37bd53 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>
2011-12-17 23:33:20 +01:00
Simon Glass 9785c905cf Move vsprintf functions into their own header
common.h is very large, so before changing the vsprintf functions, move the
prototypes into their own header file.

Signed-off-by: Simon Glass <sjg@chromium.org>
2011-12-17 23:30:35 +01:00