From b74c5c8fb4de3b2847bc942e57dcf8f0dea705be Mon Sep 17 00:00:00 2001 From: Michal Idziorek Date: Wed, 13 May 2015 23:58:39 +0200 Subject: fixed libc and 'userspace' --- kernel/syscalls.c | 49 ++++++++++++++++++++----------------------------- 1 file changed, 20 insertions(+), 29 deletions(-) (limited to 'kernel/syscalls.c') diff --git a/kernel/syscalls.c b/kernel/syscalls.c index 6d46f1a..38f7161 100644 --- a/kernel/syscalls.c +++ b/kernel/syscalls.c @@ -14,7 +14,7 @@ int syscall_unhandled(int nr) { log(FOOLOS_MODULE_NAME,FOOLOS_LOG_INFO,"syscall: %d", nr); - panic(FOOLOS_MODULE_NAME,"unhandled syscall"); + panic(FOOLOS_MODULE_NAME,"unhandled syscall (generic handler)"); } int syscall_lseek(int file,int ptr,int dir) @@ -23,7 +23,7 @@ int syscall_lseek(int file,int ptr,int dir) log(FOOLOS_MODULE_NAME,FOOLOS_LOG_INFO,"lseek (file=%d, ptr=%d, dir=%d)", file,ptr,dir); #endif - panic(FOOLOS_MODULE_NAME,"unhandled syscall"); + panic(FOOLOS_MODULE_NAME,"unhandled syscall: lseek"); return 0; @@ -39,7 +39,7 @@ int syscall_write(int file, char *buf, int len) log(FOOLOS_MODULE_NAME,FOOLOS_LOG_INFO,"[%d] write(file=%d, buf=0x%08X, len=%d)", task_get_current_pid(),file,buf,len); #endif - if(file!=1&&file!=2) panic(FOOLOS_MODULE_NAME,"unhandled syscall"); + if(file!=1&&file!=2) panic(FOOLOS_MODULE_NAME,"unhandled syscall: write (only stdout and stderr)"); //stderr and stdout go to console for(int i=0;i