summaryrefslogtreecommitdiff
path: root/src/kernel/syscalls.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/syscalls.c')
-rw-r--r--src/kernel/syscalls.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/kernel/syscalls.c b/src/kernel/syscalls.c
index c5e12b4..786578a 100644
--- a/src/kernel/syscalls.c
+++ b/src/kernel/syscalls.c
@@ -292,10 +292,13 @@ long _syscall_fs_respond(void __user *buf, long ret, int flags) {
// if this vfsop outputs data and ret is positive, it's the length of the buffer
// TODO document
ret = min(ret, capped_cast32(req->output.len));
- if (!virt_cpy(req->caller->pages, req->output.buf,
- process_current->pages, buf, ret)) {
- // how should this error even be handled? TODO
- }
+ struct virt_cpy_error err;
+ virt_cpy(req->caller->pages, req->output.buf,
+ process_current->pages, buf, ret, &err);
+
+ if (err.read_fail)
+ panic_unimplemented();
+ /* write failures are ignored */
}
process_current->handled_req = NULL;