From 042e25e19b5fc0cec1d47440c26246c886cf39f6 Mon Sep 17 00:00:00 2001 From: Michal Idziorek Date: Sun, 17 May 2015 20:40:29 +0200 Subject: started big cleanup! --- lib/logger/log.c | 94 -------------------------------------------------------- 1 file changed, 94 deletions(-) delete mode 100644 lib/logger/log.c (limited to 'lib/logger/log.c') diff --git a/lib/logger/log.c b/lib/logger/log.c deleted file mode 100644 index 430f982..0000000 --- a/lib/logger/log.c +++ /dev/null @@ -1,94 +0,0 @@ -#define FOOLOS_MODULE_NAME "log" - -#include -#include - -#include "log.h" -#include "kernel/config.h" -#include "terminal/vt52.h" -#include "lib/printf/printf.h" -#include "kernel/timer.h" - - -static char buffer[LOG_BUF_SIZE]; -static int first=0; -static int last=0; -static bool init=true;// - -static void init_log() -{ -} - -void log(char *module_name, int log_level, char *format_string, ...) -{ - - #ifdef FOOLOS_LOG_OFF - return; - #endif - - if(log_level=LOG_BUF_SIZE)first=(first+1)%LOG_BUF_SIZE; - if(last>first)if(LOG_BUF_SIZE-last+first>=LOG_BUF_SIZE)first=(first+1)%LOG_BUF_SIZE; - } - - -} - -void panic(char *module_name, char *message) -{ - char buf_log[256]; - tfp_sprintf(buf_log,"KERNEL PANIC !! %s: %s\n",module_name,message); - //console_put_str_red(buf_log); - - while(1) - { - asm volatile("cli"); - asm volatile("hlt"); - } - -} - -// unused shit! -/* -static void log_log() -{ - #ifdef FOOLOS_LOG_OFF - return; - #endif - - char buf_log[256]; - tfp_sprintf(buf_log,"[ 0.00000] log: buffer state: first=%d, last=%d, buf_size=%d\n",first,last,LOG_BUF_SIZE); - console_put_str_gray(buf_log); - for(int i=first;i!=last;i++) - { - console_put_char_gray(buffer[i]); - - } - - init=true; -} -*/ -- cgit v1.2.3