From 9e056016ce39036abbc223260e49964ef74aaa82 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Wed, 15 Sep 2021 06:58:49 +0000 Subject: fs_wait: pass the file ID too --- src/init/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/init/main.c') 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 -- cgit v1.2.3