summaryrefslogtreecommitdiffstats
path: root/include/vsprintf.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2013-06-11 11:14:38 -0700
committerTom Rini <trini@ti.com>2013-06-26 10:16:41 -0400
commitb8bcaa3ad393c34b7cdd9c8dcd9e9b82e2a34c58 (patch)
tree459c6fbd20218790caffe466f6c9f4b84fb4d785 /include/vsprintf.h
parent5d3bd34545061ec665e64d7f5162fb5eef1e3001 (diff)
downloadtalos-obmc-uboot-b8bcaa3ad393c34b7cdd9c8dcd9e9b82e2a34c58.tar.gz
talos-obmc-uboot-b8bcaa3ad393c34b7cdd9c8dcd9e9b82e2a34c58.zip
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>
Diffstat (limited to 'include/vsprintf.h')
-rw-r--r--include/vsprintf.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/vsprintf.h b/include/vsprintf.h
index 651077ca4d..6568854fbe 100644
--- a/include/vsprintf.h
+++ b/include/vsprintf.h
@@ -178,4 +178,15 @@ int vscnprintf(char *buf, size_t size, const char *fmt, va_list args);
#define vscnprintf(buf, size, fmt, args...) vsprintf(buf, fmt, ##args)
#endif /* CONFIG_SYS_VSNPRINTF */
+/**
+ * print_grouped_ull() - print a value with digits grouped by ','
+ *
+ * This prints a value with grouped digits, like 12,345,678 to make it easier
+ * to read.
+ *
+ * @val: Value to print
+ * @digits: Number of digiits to print
+ */
+void print_grouped_ull(unsigned long long int_val, int digits);
+
#endif
OpenPOWER on IntegriCloud