diff options
-rw-r--r-- | src/init/main.c | 4 | ||||
-rw-r--r-- | src/init/syscalls.c | 4 | ||||
-rw-r--r-- | src/kernel/syscalls.c | 4 | ||||
-rw-r--r-- | src/shared/syscalls.h | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/src/init/main.c b/src/init/main.c index 28bb4a7..1842156 100644 --- a/src/init/main.c +++ b/src/init/main.c @@ -54,7 +54,7 @@ void fs_server(handle_t back) { case VFSOP_OPEN: _syscall_write(tty_fd, buf, len); log(" was opened. "); - _syscall_fs_respond(0, NULL, 0); // doesn't check the path yet + _syscall_fs_respond(NULL, 0); // doesn't check the path yet break; case VFSOP_WRITE: @@ -62,7 +62,7 @@ void fs_server(handle_t back) { for (int i = 0; i < len; i++) buf[i] &= ~32; // and passthrough to tty _syscall_write(tty_fd, buf, len); - _syscall_fs_respond(len, NULL, 0); // return the amt of bytes written + _syscall_fs_respond(NULL, len); // return the amt of bytes written break; default: diff --git a/src/init/syscalls.c b/src/init/syscalls.c index 50d7067..1f80d29 100644 --- a/src/init/syscalls.c +++ b/src/init/syscalls.c @@ -45,8 +45,8 @@ 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_fs_respond(char __user *buf, int ret) { + return _syscall(_SYSCALL_FS_RESPOND, (int)buf, ret, 0); } int _syscall_memflag(void __user *addr, size_t len, int flags) { diff --git a/src/kernel/syscalls.c b/src/kernel/syscalls.c index 18ecd25..6821871 100644 --- a/src/kernel/syscalls.c +++ b/src/kernel/syscalls.c @@ -220,7 +220,7 @@ int _syscall_fs_wait(handle_t back, char __user *buf, int __user *len) { } } -int _syscall_fs_respond(int ret, char __user *buf, int len) { +int _syscall_fs_respond(char __user *buf, int ret) { struct vfs_request *req = process_current->handled_req; if (!req) return -1; @@ -273,7 +273,7 @@ int syscall_handler(int num, int a, int b, int c) { case _SYSCALL_FS_WAIT: return _syscall_fs_wait(a, (userptr_t)b, (userptr_t)c); case _SYSCALL_FS_RESPOND: - return _syscall_fs_respond(a, (userptr_t)b, c); + return _syscall_fs_respond((userptr_t)a, b); case _SYSCALL_MEMFLAG: return _syscall_memflag((userptr_t)a, b, c); default: diff --git a/src/shared/syscalls.h b/src/shared/syscalls.h index 2b5a80e..e8e0843 100644 --- a/src/shared/syscalls.h +++ b/src/shared/syscalls.h @@ -55,6 +55,6 @@ int _syscall_close(handle_t); */ handle_t _syscall_fs_create(handle_t __user *back); int _syscall_fs_wait(handle_t back, char __user *buf, int __user *len); -int _syscall_fs_respond(int ret, char __user *buf, int len); +int _syscall_fs_respond(char __user *buf, int ret); int _syscall_memflag(void __user *addr, size_t len, int flags); |