summaryrefslogtreecommitdiff
path: root/src/kernel/vfs/request.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/vfs/request.c')
-rw-r--r--src/kernel/vfs/request.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/kernel/vfs/request.c b/src/kernel/vfs/request.c
index 21eecb8..0c763b3 100644
--- a/src/kernel/vfs/request.c
+++ b/src/kernel/vfs/request.c
@@ -59,7 +59,8 @@ void vfsreq_finish(VfsReq *req, char __user *stored, long ret,
} else {
/* delegating - moving a handle to the caller */
assert(handler);
- h = proc_hid_take(handler, ret);
+ h = hs_take(handler->hs, ret);
+ // TODO!!! no null check
h->readable = h->readable && OPEN_READABLE(req->flags);
h->writeable = h->writeable && OPEN_WRITEABLE(req->flags);
}
@@ -67,7 +68,7 @@ void vfsreq_finish(VfsReq *req, char __user *stored, long ret,
if (h) {
// TODO write tests for caller getting killed while opening a file
if (!req->caller) panic_unimplemented();
- ret = proc_handle_put(req->caller, h);
+ ret = hs_put(req->caller->hs, h);
if (ret < 0) ret = -EMFILE;
} else {
ret = -1;
@@ -148,7 +149,7 @@ static void vfs_backend_user_accept(VfsReq *req) {
}
Handle *h;
- hid_t hid = proc_handle_init(handler, HANDLE_FS_REQ, &h);
+ hid_t hid = hs_hinit(handler->hs, HANDLE_FS_REQ, &h);
if (hid < 0) panic_unimplemented();
h->req = req;
proc_setstate(handler, PS_RUNNING);