diff options
Diffstat (limited to 'src/init')
-rw-r--r-- | src/init/main.c | 8 | ||||
-rw-r--r-- | src/init/syscalls.c | 4 |
2 files changed, 6 insertions, 6 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 diff --git a/src/init/syscalls.c b/src/init/syscalls.c index fb50c35..6e00895 100644 --- a/src/init/syscalls.c +++ b/src/init/syscalls.c @@ -39,8 +39,8 @@ handle_t _syscall_fs_create(handle_t __user *back) { return _syscall(_SYSCALL_FS_CREATE, (int)back, 0, 0, 0); } -int _syscall_fs_wait(handle_t back, char __user *buf, int __user *len) { - return _syscall(_SYSCALL_FS_WAIT, back, (int)buf, (int)len, 0); +int _syscall_fs_wait(handle_t back, char __user *buf, int __user *len, int __user *id) { + return _syscall(_SYSCALL_FS_WAIT, back, (int)buf, (int)len, (int)id); } int _syscall_fs_respond(char __user *buf, int ret) { |