From eca57656bfb384583c1c4b34de46cde6b36d6694 Mon Sep 17 00:00:00 2001 From: Michal Idziorek Date: Sat, 22 Nov 2014 17:57:57 +0100 Subject: added call_unhandled for unhandled syscalls --- kernel/config.h | 2 +- kernel/syscalls.c | 5 +++++ kernel/syscalls.h | 4 +++- 3 files changed, 9 insertions(+), 2 deletions(-) (limited to 'kernel') diff --git a/kernel/config.h b/kernel/config.h index e48c63c..ef0fa71 100644 --- a/kernel/config.h +++ b/kernel/config.h @@ -6,7 +6,7 @@ //#define FOOLOS_COMPILE_FLOPPY // compile floppy drivers #define FOOLOS_CONSOLE_AUTOBREAK // add newline automatically at end of line -#define FOOLOS_LOG_OFF // do not log anything +//#define FOOLOS_LOG_OFF // do not log anything #define FOOLOS_CONSOLE // otherwise VESA will be used! #define MEM_PRINT_MEMORYMAP #define LOG_BUF_SIZE 4069 diff --git a/kernel/syscalls.c b/kernel/syscalls.c index 1be1053..f85cfce 100644 --- a/kernel/syscalls.c +++ b/kernel/syscalls.c @@ -74,6 +74,11 @@ Elf32_Phdr; static uint32_t alloc=0x900000; +int syscall_unhandled(int nr) +{ + log(FOOLOS_MODULE_NAME,FOOLOS_LOG_INFO,"syscall: %d", nr); + panic(FOOLOS_MODULE_NAME,"unhandled syscall"); +} int syscall_write(int file, char *buf, int len) { diff --git a/kernel/syscalls.h b/kernel/syscalls.h index 6868033..00df0fa 100644 --- a/kernel/syscalls.h +++ b/kernel/syscalls.h @@ -43,7 +43,7 @@ int syscall_fstat(int file, struct stat *st,int none); int syscall_isatty(int file,int none1,int none2); int syscall_lseek(int file,int ptr,int dir); int syscall_sbrk(int incr, int none1, int none2); - +// int syscall_gettimeofday(struct timeval *tv, struct timezone *tz); int syscall_fork(void); int syscall_getpid(void); @@ -53,6 +53,8 @@ int syscall_stat(char *file, struct stat *st); int syscall_times(struct tms *buf); int syscall_unlink(char *name); int syscall_wait(int *status); +// +int syscall_unhandled(int nr); -- cgit v1.2.3