aboutsummaryrefslogtreecommitdiff
path: root/core/console-log.c
diff options
context:
space:
mode:
authorStewart Smith <stewart@linux.vnet.ibm.com>2014-07-31 14:30:03 +1000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2014-08-08 16:07:26 +1000
commit451e6a755e58e692d1ec8ffb1b1416a0a0c47604 (patch)
treecb61365796c0f4ea47c5ccc0d40c045dbdbd2857 /core/console-log.c
parent904a3b51a20102fb504c498a55d31ce87c525643 (diff)
downloadskiboot-451e6a755e58e692d1ec8ffb1b1416a0a0c47604.zip
skiboot-451e6a755e58e692d1ec8ffb1b1416a0a0c47604.tar.gz
skiboot-451e6a755e58e692d1ec8ffb1b1416a0a0c47604.tar.bz2
Write log messages with log_level > PR_NOTICE only to in memory log
We modify write() (adding console_write()) which calls down to a modified __flush_console() which can now decide if it's flushing the added console contents to the console drivers or not. A future patch may add support for changing PR_NOTICE to some other 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.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/console-log.c b/core/console-log.c
index 6a70e57..3d1b43f 100644
--- a/core/console-log.c
+++ b/core/console-log.c
@@ -24,6 +24,7 @@
#include "skiboot.h"
#include "unistd.h"
#include "stdio.h"
+#include "console.h"
#include "timebase.h"
static int vprlog(int log_level, const char *fmt, va_list ap)
@@ -34,7 +35,8 @@ static int vprlog(int log_level, const char *fmt, va_list ap)
count = snprintf(buffer, sizeof(buffer), "[%lu,%d] ",
mftb(), log_level);
count+= vsnprintf(buffer+count, sizeof(buffer)-count, fmt, ap);
- write(0, buffer, count);
+
+ console_write((log_level > PR_NOTICE) ? false : true, buffer, count);
return count;
}