diff options
author | dzwdz | 2021-09-15 06:58:49 +0000 |
---|---|---|
committer | dzwdz | 2021-09-15 06:58:49 +0000 |
commit | 9e056016ce39036abbc223260e49964ef74aaa82 (patch) | |
tree | 850a89bf9e9a268803dd6cb385c75b86c7859690 /src/init/main.c | |
parent | 06f089b35046342fca2c30040749c632785ce6c6 (diff) |
fs_wait: pass the file ID too
Diffstat (limited to 'src/init/main.c')
-rw-r--r-- | src/init/main.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/init/main.c b/src/init/main.c index 1842156..15afaf5 100644 --- a/src/init/main.c +++ b/src/init/main.c @@ -47,19 +47,19 @@ void fs_test(void) { void fs_server(handle_t back) { static char buf[64]; - int len; + int len, id; for (;;) { len = 64; - switch (_syscall_fs_wait(back, buf, &len)) { + switch (_syscall_fs_wait(back, buf, &len, &id)) { case VFSOP_OPEN: _syscall_write(tty_fd, buf, len); log(" was opened. "); - _syscall_fs_respond(NULL, 0); // doesn't check the path yet + _syscall_fs_respond(NULL, 32); // doesn't check the path yet break; case VFSOP_WRITE: // uppercase the buffer - for (int i = 0; i < len; i++) buf[i] &= ~32; + for (int i = 0; i < len; i++) buf[i] &= ~id; // id == 32 // and passthrough to tty _syscall_write(tty_fd, buf, len); _syscall_fs_respond(NULL, len); // return the amt of bytes written |