diff options
Diffstat (limited to 'src/init/main.c')
-rw-r--r-- | src/init/main.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/init/main.c b/src/init/main.c index 41f51d3..8d677af 100644 --- a/src/init/main.c +++ b/src/init/main.c @@ -30,8 +30,18 @@ int main(void) { void fs_test(void) { handle_t front, back, file; front = _syscall_fs_create((void*)&back); // TODO change user_ptr to void* - _syscall_mount(front, argify("/mnt")); - file = _syscall_open(argify("/mnt/test")); + + if (_syscall_fork()) { + // child: is the fs server + log("fs_wait started. "); + _syscall_fs_wait(back, NULL); + log("fs_wait returned. "); + } else { + // parent: accesses the fs + _syscall_mount(front, argify("/mnt")); + log("requesting file. "); + file = _syscall_open(argify("/mnt/test")); + } } void misc_tests(void) { |