From 7b0d88b2dff9b635d9ff69f6d51b6832c1ca4c40 Mon Sep 17 00:00:00 2001 From: Miguel Date: Sat, 18 Aug 2018 13:23:53 +0200 Subject: cleaning up syscalls and playing with new pipes --- lib/logger/log.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'lib') diff --git a/lib/logger/log.c b/lib/logger/log.c index d591b36..5350eda 100644 --- a/lib/logger/log.c +++ b/lib/logger/log.c @@ -5,7 +5,6 @@ #include #include "kernel/kernel.h" -#include "kernel/config.h" #include "kernel/timer.h" #include "kernel/fifo.h" @@ -13,10 +12,8 @@ static void log_string(char *str) { - while(*str!=0) - { - fifo_put(&get_fool()->std_out,*(str++)); - } + if(get_max_fd()<2)return; +// syscall_write(2,str,strlen(str)); } void log(char *module_name, int log_level, char *format_string, ...) @@ -52,7 +49,9 @@ void panic(char *module_name, char *message) { char buf_log[256]; tfp_sprintf(buf_log,"\033[41;37m\n !! KERNEL PANIC !! %s: %s\n\n",module_name,message); - log_string(buf_log); +// log_string(buf_log); + //PANIC DIRECTLY TO STDOUT// + syscall_write(1,buf_log,strlen(buf_log)); while(1) { -- cgit v1.2.3