From 625ae265cbabe76bd272e9e8f0f637635af64b23 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Sun, 12 Sep 2021 13:00:20 +0200 Subject: vfs_request refactor pt2 --- src/kernel/syscalls.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/kernel/syscalls.c') diff --git a/src/kernel/syscalls.c b/src/kernel/syscalls.c index fdf4b84..eb8da09 100644 --- a/src/kernel/syscalls.c +++ b/src/kernel/syscalls.c @@ -88,11 +88,11 @@ handle_t _syscall_open(const char __user *path, int len) { vfs_request_create((struct vfs_request) { .type = VFSOP_OPEN, - .open = { - .path = &path_buf[mount->prefix_len], - .path_len = len - mount->prefix_len, + .input = { + .kern = true, + .buf_kern = &path_buf[mount->prefix_len], // TODO this is unfreeable + .len = len - mount->prefix_len, }, - .caller = process_current, .backend = mount->backend, }); @@ -146,11 +146,11 @@ int _syscall_write(handle_t handle_num, const char __user *buf, int len) { if (handle->type != HANDLE_FILE) return -1; vfs_request_create((struct vfs_request) { .type = VFSOP_WRITE, - .rw = { + .input = { .buf = (userptr_t) buf, - .buf_len = len, - .id = handle->file.id, + .len = len, }, + .id = handle->file.id, .caller = process_current, .backend = handle->file.backend, }); -- cgit v1.2.3