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/kernel/syscalls.c | |
parent | 06f089b35046342fca2c30040749c632785ce6c6 (diff) |
fs_wait: pass the file ID too
Diffstat (limited to 'src/kernel/syscalls.c')
-rw-r--r-- | src/kernel/syscalls.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/kernel/syscalls.c b/src/kernel/syscalls.c index 3ed4877..48e67db 100644 --- a/src/kernel/syscalls.c +++ b/src/kernel/syscalls.c @@ -195,7 +195,7 @@ fail: return -1; } -int _syscall_fs_wait(handle_t back, char __user *buf, int __user *len) { +int _syscall_fs_wait(handle_t back, char __user *buf, int __user *len, int __user *id) { struct handle *back_handle; if (back < 0 || back >= HANDLE_MAX) return -1; @@ -209,6 +209,7 @@ int _syscall_fs_wait(handle_t back, char __user *buf, int __user *len) { * vfs_request_pass2handler simpler. TODO? */ process_current->awaited_req.buf = buf; process_current->awaited_req.len = len; + process_current->awaited_req.id = id; if (back_handle->fs.backend->queue) { // handle queued requests @@ -271,7 +272,7 @@ int _syscall(int num, int a, int b, int c, int d) { case _SYSCALL_FS_CREATE: return _syscall_fs_create((userptr_t)a); case _SYSCALL_FS_WAIT: - return _syscall_fs_wait(a, (userptr_t)b, (userptr_t)c); + return _syscall_fs_wait(a, (userptr_t)b, (userptr_t)c, (userptr_t)d); case _SYSCALL_FS_RESPOND: return _syscall_fs_respond((userptr_t)a, b); case _SYSCALL_MEMFLAG: |