From c6424fbc55298399f133ca1ede11e1f0b4a5c824 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Fri, 29 Jul 2022 16:16:24 +0200 Subject: use a shared fs_normslice() function to handle offsets --- src/kernel/vfs/request.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/kernel/vfs/request.c') diff --git a/src/kernel/vfs/request.c b/src/kernel/vfs/request.c index 83a104f..0164dfd 100644 --- a/src/kernel/vfs/request.c +++ b/src/kernel/vfs/request.c @@ -109,7 +109,7 @@ void vfs_backend_user_accept(struct vfs_request *req) { struct process *handler; struct fs_wait_response res = {0}; struct virt_cpy_error cpyerr; - int len = 0; + int len; assert(req && req->backend && req->backend->user.handler); handler = req->backend->user.handler; @@ -131,6 +131,8 @@ void vfs_backend_user_accept(struct vfs_request *req) { vfsreq_finish_short(req, -EFAULT); return; } + } else { + len = req->output.len; } res.len = len; -- cgit v1.2.3