aboutsummaryrefslogtreecommitdiff
path: root/kernel/features/syscall.c
diff options
context:
space:
mode:
authorMarvin Borner2020-08-16 00:44:53 +0200
committerMarvin Borner2020-08-16 00:44:53 +0200
commitc4a0bc2571162ad83fc51eb823f1c535336041bf (patch)
treecba1169a027fea8884e882be601bf3cbaeaab654 /kernel/features/syscall.c
parent9a827eb5f6ff58bf801bc98bcb653876428ebe69 (diff)
Added psf/gui to libgui
...and some other things
Diffstat (limited to 'kernel/features/syscall.c')
-rw-r--r--kernel/features/syscall.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/kernel/features/syscall.c b/kernel/features/syscall.c
index fd57f3b..b486deb 100644
--- a/kernel/features/syscall.c
+++ b/kernel/features/syscall.c
@@ -1,6 +1,7 @@
// MIT License, Copyright (c) 2020 Marvin Borner
#include <cpu.h>
+#include <fs.h>
#include <interrupts.h>
#include <load.h>
#include <mem.h>
@@ -27,6 +28,14 @@ void syscall_handler(struct regs *r)
free(r->eax);
break;
}
+ case SYS_READ: {
+ r->eax = (u32)read_file((char *)r->ebx);
+ break;
+ }
+ case SYS_WRITE: {
+ // TODO: Write ext2 support
+ break;
+ }
case SYS_EXEC: {
char *path = (char *)r->ebx;
struct proc *proc = proc_make();