summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/kernel/vfs/request.c7
-rw-r--r--src/shared/syscalls.h1
2 files changed, 5 insertions, 3 deletions
diff --git a/src/kernel/vfs/request.c b/src/kernel/vfs/request.c
index 9826982..f431eac 100644
--- a/src/kernel/vfs/request.c
+++ b/src/kernel/vfs/request.c
@@ -59,9 +59,10 @@ _Noreturn void vfs_request_pass2handler(struct vfs_request *req) {
goto fail; // can't copy buffer
}
- res.len = len;
- res.id = req->id;
- res.offset = req->offset;
+ res.len = len;
+ res.capacity = req->output.len;
+ res.id = req->id;
+ res.offset = req->offset;
if (!virt_cpy_to(handler->pages,
handler->awaited_req.res, &res, sizeof res))
diff --git a/src/shared/syscalls.h b/src/shared/syscalls.h
index f136ed2..8ec1a41 100644
--- a/src/shared/syscalls.h
+++ b/src/shared/syscalls.h
@@ -51,6 +51,7 @@ handle_t _syscall_fs_fork2(void);
struct fs_wait_response {
int len; // how much was put in *buf
+ int capacity; // how much output can be accepted by the caller
int id; // file id (returned by the open handler, passed to other calls)
int offset;
};