From 3ea9657aaaf02709c8f216285b095af29e76491c Mon Sep 17 00:00:00 2001 From: dzwdz Date: Sun, 12 Sep 2021 17:53:48 +0200 Subject: implement part of `fs_respond` --- src/init/main.c | 2 ++ src/init/syscalls.c | 4 ++++ 2 files changed, 6 insertions(+) (limited to 'src/init') diff --git a/src/init/main.c b/src/init/main.c index fa4fda7..de8a599 100644 --- a/src/init/main.c +++ b/src/init/main.c @@ -39,10 +39,12 @@ void fs_test(void) { _syscall_fs_wait(back, buf, &len); log("fs_wait returned. "); _syscall_write(tty_fd, buf, len); + _syscall_fs_respond(0, NULL, 0); } else { // parent: accesses the fs _syscall_mount(front, argify("/mnt")); log("requesting file. "); file = _syscall_open(argify("/mnt/test")); + log("open returned. "); } } diff --git a/src/init/syscalls.c b/src/init/syscalls.c index 8d5ecf2..50d7067 100644 --- a/src/init/syscalls.c +++ b/src/init/syscalls.c @@ -45,6 +45,10 @@ int _syscall_fs_wait(handle_t back, char __user *buf, int __user *len) { return _syscall(_SYSCALL_FS_WAIT, back, (int)buf, (int)len); } +int _syscall_fs_respond(int ret, char __user *buf, int len) { + return _syscall(_SYSCALL_FS_RESPOND, ret, (int)buf, len); +} + int _syscall_memflag(void __user *addr, size_t len, int flags) { return _syscall(_SYSCALL_MEMFLAG, (int)addr, len, flags); } -- cgit v1.2.3