summaryrefslogtreecommitdiff
path: root/src/kernel/vfs/request.c
diff options
context:
space:
mode:
authordzwdz2022-07-29 16:16:24 +0200
committerdzwdz2022-07-29 16:16:24 +0200
commitc6424fbc55298399f133ca1ede11e1f0b4a5c824 (patch)
treed8dd1c160a7184a99ea3c72779dce95b4bbee692 /src/kernel/vfs/request.c
parenta0b16620e1699504e8d21a481e019dec40d7ee1b (diff)
use a shared fs_normslice() function to handle offsets
Diffstat (limited to 'src/kernel/vfs/request.c')
-rw-r--r--src/kernel/vfs/request.c4
1 files changed, 3 insertions, 1 deletions
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;