diff options
author | dzwdz | 2022-07-08 14:40:44 +0200 |
---|---|---|
committer | dzwdz | 2022-07-08 14:40:44 +0200 |
commit | 1f7e7501660123ff8f26e8c65e75c2b282b933ef (patch) | |
tree | 5ba6cee10ac656b20dcabc9c9f7b079dcd952a45 /src/kernel/vfs/request.h | |
parent | e567ebeee5ea196128f15adcf30cec5dd1137f90 (diff) |
syscall/fs_respond: get the file id from the buf argument
Previously, file ids could only be positive integers, so their range
was 31 bits - not enough to represent the entire memory. Now, pointers
can be safely used as file ids.
Diffstat (limited to 'src/kernel/vfs/request.h')
-rw-r--r-- | src/kernel/vfs/request.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/kernel/vfs/request.h b/src/kernel/vfs/request.h index 7d36a5d..29f1ee9 100644 --- a/src/kernel/vfs/request.h +++ b/src/kernel/vfs/request.h @@ -47,7 +47,7 @@ struct vfs_request { size_t len; } output; - int id; // handle.file.id + void __user *id; // handle.file.id int offset; int flags; @@ -59,10 +59,10 @@ struct vfs_request { /** Assigns the vfs_request to the caller, and dispatches the call */ void vfsreq_create(struct vfs_request); -void vfsreq_finish(struct vfs_request*, int ret, int flags, struct process *handler); +void vfsreq_finish(struct vfs_request*, char __user *stored, int ret, int flags, struct process *handler); static inline void vfsreq_finish_short(struct vfs_request *req, int ret) { - vfsreq_finish(req, ret, 0, NULL); + vfsreq_finish(req, (void __user *)ret, ret, 0, NULL); } /** Try to accept an enqueued request */ |