summaryrefslogtreecommitdiffstats
path: root/core/console-log.c
diff options
context:
space:
mode:
authorStewart Smith <stewart@linux.vnet.ibm.com>2014-07-31 14:29:46 +1000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2014-08-08 16:07:25 +1000
commit89a9ca379f2bcf618ae8796dfdd277424249da32 (patch)
treee7e8af7941352056d1e57d5e0e05593a113d59f9 /core/console-log.c
parente139f2558d34da0ea29f0eaae5843efa0b1aaf5c (diff)
downloadblackbird-skiboot-89a9ca379f2bcf618ae8796dfdd277424249da32.tar.gz
blackbird-skiboot-89a9ca379f2bcf618ae8796dfdd277424249da32.zip
replace printf() with console log, level 5 aka INFO messages
Replace the libc printf implementation with a wrapper that does fancy log things such as display timestamp and the log level. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'core/console-log.c')
-rw-r--r--core/console-log.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/core/console-log.c b/core/console-log.c
index 04f2cdd0..6a70e577 100644
--- a/core/console-log.c
+++ b/core/console-log.c
@@ -52,3 +52,15 @@ void prlog(int log_level, const char* fmt, ...)
vprlog(log_level, fmt, ap);
va_end(ap);
}
+
+int printf(const char* fmt, ...)
+{
+ int count;
+ va_list ap;
+
+ va_start(ap, fmt);
+ count = vprlog(PR_PRINTF, fmt, ap);
+ va_end(ap);
+
+ return count;
+}
OpenPOWER on IntegriCloud