diff options
author | dzwdz | 2021-09-12 12:47:51 +0200 |
---|---|---|
committer | dzwdz | 2021-09-12 12:47:51 +0200 |
commit | e65d58357aaff7c1d05c06753538383478c1b0e9 (patch) | |
tree | 524acff4943892d62cfcd33a26fc83cace6aef83 /src/kernel/vfs/root.c | |
parent | 8fe035d7d75d09f314f9e8aefe1dcaf1e10d1954 (diff) |
vfs request refactor pt1
Diffstat (limited to 'src/kernel/vfs/root.c')
-rw-r--r-- | src/kernel/vfs/root.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/kernel/vfs/root.c b/src/kernel/vfs/root.c index 5b23555..29caf14 100644 --- a/src/kernel/vfs/root.c +++ b/src/kernel/vfs/root.c @@ -5,21 +5,21 @@ #include <kernel/util.h> #include <kernel/vfs/root.h> -int vfs_root_handler(struct vfs_op_request *req) { - switch (req->op.type) { +int vfs_root_handler(struct vfs_request *req) { + switch (req->type) { case VFSOP_OPEN: - if (req->op.open.path_len == 4 - && !memcmp(req->op.open.path, "/tty", 4)) { + if (req->open.path_len == 4 + && !memcmp(req->open.path, "/tty", 4)) { return 0; } return -1; case VFSOP_WRITE: - switch (req->op.rw.id) { + switch (req->rw.id) { // every id corresponds to a special file type // this is a shit way to do this but :shrug: case 0: { // tty struct virt_iter iter; - virt_iter_new(&iter, req->op.rw.buf, req->op.rw.buf_len, + virt_iter_new(&iter, req->rw.buf, req->rw.buf_len, req->caller->pages, true, false); while (virt_iter_next(&iter)) tty_write(iter.frag, iter.frag_len); |