From e285e7cab2fe62e91cb726c429f872b2475fdf0a Mon Sep 17 00:00:00 2001 From: Michal Idziorek Date: Mon, 8 Dec 2014 21:59:14 +0100 Subject: fixed vesa fb mode! --- lib/logger/log.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/logger/log.c b/lib/logger/log.c index 8d69fc3..7d7bc58 100644 --- a/lib/logger/log.c +++ b/lib/logger/log.c @@ -1,19 +1,20 @@ #define FOOLOS_MODULE_NAME "log" #include +#include #include "log.h" #include "kernel/config.h" #include "kernel/console.h" #include "lib/printf/printf.h" #include "lib/int/stdint.h" -#include "lib/bool/bool.h" #include "kernel/timer.h" static char buffer[LOG_BUF_SIZE]; static int first=0; static int last=0; +static bool init=false; void log(char *module_name, int log_level, char *format_string, ...) { @@ -40,7 +41,8 @@ void log(char *module_name, int log_level, char *format_string, ...) va_end(va); tfp_sprintf(buf_log,"%s %s: %s\n",buf_time,module_name,buf_info); - console_put_str_gray(buf_log); + + if(init)console_put_str_gray(buf_log); for(int i=0;buf_log[i]!=0;i++) { @@ -76,5 +78,7 @@ void log_log() console_put_char_gray(buffer[i]); } + + init=true; } -- cgit v1.2.3