diff options
Diffstat (limited to 'src/kernel/syscalls.c')
-rw-r--r-- | src/kernel/syscalls.c | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/src/kernel/syscalls.c b/src/kernel/syscalls.c index a6c807c..0b22770 100644 --- a/src/kernel/syscalls.c +++ b/src/kernel/syscalls.c @@ -96,11 +96,8 @@ hid_t _sys_open(const char __user *path, long len, int flags) { vfsreq_dispatchcopy((VfsReq) { .type = VFSOP_OPEN, - .input = { - .kern = true, - .buf_kern = path_buf, - .len = len, - }, + .kin = path_buf, + .kinlen = len, .caller = proc_cur, .backend = mount->backend, .flags = flags, @@ -198,12 +195,12 @@ static long simple_vfsop( .flags = flags, }; if (vfsop == VFSOP_READ) { - req.output.buf = buf; - req.output.len = len; + req.out = buf; + req.outlen = len; } if (vfsop == VFSOP_WRITE) { - req.input.buf = buf; - req.input.len = len; + req.uin = buf; + req.uinlen = len; } vfsreq_dispatchcopy(req); } else if (h->type == HANDLE_PIPE) { @@ -295,12 +292,8 @@ long _sys_fs_respond(hid_t hid, const void __user *buf, long ret, int flags) { if (ret > 0 && req->type == VFSOP_READ) { /* vfsreq_finish can't copy this data, as it doesn't know where the * buf argument came from */ - ret = min(ret, capped_cast32(req->output.len)); - ret = pcpy_bi( - req->caller, req->output.buf, - proc_cur, buf, - ret - ); + ret = min(ret, capped_cast32(req->outlen)); + ret = pcpy_bi(req->caller, req->out, proc_cur, buf, ret); } vfsreq_finish(req, (void __user *)buf, ret, flags, proc_cur); } |