From 1f7e7501660123ff8f26e8c65e75c2b282b933ef Mon Sep 17 00:00:00 2001 From: dzwdz Date: Fri, 8 Jul 2022 14:40:44 +0200 Subject: syscall/fs_respond: get the file id from the buf argument Previously, file ids could only be positive integers, so their range was 31 bits - not enough to represent the entire memory. Now, pointers can be safely used as file ids. --- src/kernel/syscalls.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/kernel/syscalls.c') diff --git a/src/kernel/syscalls.c b/src/kernel/syscalls.c index cb26b70..e639d1f 100644 --- a/src/kernel/syscalls.c +++ b/src/kernel/syscalls.c @@ -246,7 +246,7 @@ int _syscall_fs_wait(char __user *buf, int max_len, struct fs_wait_response __us return -1; // dummy } -int _syscall_fs_respond(char __user *buf, int ret, int flags) { +int _syscall_fs_respond(void __user *buf, int ret, int flags) { struct vfs_request *req = process_current->handled_req; if (!req) SYSCALL_RETURN(-1); @@ -261,7 +261,7 @@ int _syscall_fs_respond(char __user *buf, int ret, int flags) { } process_current->handled_req = NULL; - vfsreq_finish(req, ret, flags, process_current); + vfsreq_finish(req, buf, ret, flags, process_current); SYSCALL_RETURN(0); } -- cgit v1.2.3