summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMiguel <m.i@gmx.at>2018-08-18 13:23:53 +0200
committerMiguel <m.i@gmx.at>2018-08-18 13:23:53 +0200
commit7b0d88b2dff9b635d9ff69f6d51b6832c1ca4c40 (patch)
tree22c452e9c7ad586136721e776e0b67b23fb33119 /lib
parent17fd357bad5f6c3362cfdab1d807aa463c69a4e9 (diff)
cleaning up syscalls and playing with new pipes
Diffstat (limited to 'lib')
-rw-r--r--lib/logger/log.c11
1 files changed, 5 insertions, 6 deletions
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 <stdbool.h>
#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)
{