summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorMichal Idziorek <m.i@gmx.at>2014-11-22 17:57:57 +0100
committerMichal Idziorek <m.i@gmx.at>2014-11-22 17:57:57 +0100
commiteca57656bfb384583c1c4b34de46cde6b36d6694 (patch)
tree849d76c8bac2c663e7097506b1ecc66b6982dc56 /kernel
parent05156e002e30032e8c1081d47f50dd98b1241dd6 (diff)
added call_unhandled for unhandled syscalls
Diffstat (limited to 'kernel')
-rw-r--r--kernel/config.h2
-rw-r--r--kernel/syscalls.c5
-rw-r--r--kernel/syscalls.h4
3 files changed, 9 insertions, 2 deletions
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);