From 451e6a755e58e692d1ec8ffb1b1416a0a0c47604 Mon Sep 17 00:00:00 2001 From: Stewart Smith Date: Thu, 31 Jul 2014 14:30:03 +1000 Subject: 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 Signed-off-by: Benjamin Herrenschmidt --- include/console.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include/console.h') diff --git a/include/console.h b/include/console.h index 791f770e..8a47bad1 100644 --- a/include/console.h +++ b/include/console.h @@ -17,6 +17,7 @@ #ifndef __CONSOLE_H #define __CONSOLE_H +#include "unistd.h" #include /* @@ -56,9 +57,11 @@ extern struct lock con_lock; extern bool dummy_console_enabled(void); extern void force_dummy_console(void); extern bool flush_console(void); -extern bool __flush_console(void); +extern bool __flush_console(bool flush_to_drivers); extern void set_console(struct con_ops *driver); +ssize_t console_write(bool flush_to_drivers, const void *buf, size_t count); + extern void clear_console(void); extern void memcons_add_properties(void); extern void dummy_console_add_nodes(void); -- cgit v1.2.1