diff options
| author | Michal Idziorek <m.i@gmx.at> | 2014-12-08 21:59:14 +0100 |
|---|---|---|
| committer | Michal Idziorek <m.i@gmx.at> | 2014-12-08 21:59:14 +0100 |
| commit | e285e7cab2fe62e91cb726c429f872b2475fdf0a (patch) | |
| tree | dfc0e78b81dc2ca9dd77641cca9be5527b2bc5de /lib | |
| parent | ddba680892e4dc8973d6c1d59f92affb987ca13b (diff) | |
fixed vesa fb mode!
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/logger/log.c | 8 |
1 files changed, 6 insertions, 2 deletions
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 <stdarg.h> +#include <stdbool.h> #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; } |
