diff options
-rw-r--r-- | src/kernel/arch/i386/boot.c | 2 | ||||
-rw-r--r-- | src/kernel/arch/i386/driver/fsroot.c (renamed from src/kernel/vfs/root.c) | 12 | ||||
-rw-r--r-- | src/kernel/arch/i386/driver/fsroot.h (renamed from src/kernel/vfs/root.h) | 0 | ||||
-rw-r--r-- | src/kernel/vfs/request.c | 2 |
4 files changed, 5 insertions, 11 deletions
diff --git a/src/kernel/arch/i386/boot.c b/src/kernel/arch/i386/boot.c index be80f73..4969c1c 100644 --- a/src/kernel/arch/i386/boot.c +++ b/src/kernel/arch/i386/boot.c @@ -1,6 +1,7 @@ #include <kernel/arch/generic.h> #include <kernel/arch/i386/ata.h> #include <kernel/arch/i386/boot.h> +#include <kernel/arch/i386/driver/fsroot.h> #include <kernel/arch/i386/driver/ps2.h> #include <kernel/arch/i386/driver/serial.h> #include <kernel/arch/i386/gdt.h> @@ -10,7 +11,6 @@ #include <kernel/main.h> #include <kernel/mem/alloc.h> #include <kernel/panic.h> -#include <kernel/vfs/root.h> void tty_init(void); // TODO put this in a header file diff --git a/src/kernel/vfs/root.c b/src/kernel/arch/i386/driver/fsroot.c index 8ba2043..49cecc9 100644 --- a/src/kernel/vfs/root.c +++ b/src/kernel/arch/i386/driver/fsroot.c @@ -3,12 +3,10 @@ #include <kernel/panic.h> #include <kernel/proc.h> #include <kernel/util.h> -#include <kernel/vfs/root.h> +#include <kernel/arch/i386/driver/fsroot.h> #include <shared/mem.h> #include <stdbool.h> -// TODO move to arch/ - enum { HANDLE_ROOT, HANDLE_VGA, @@ -45,7 +43,7 @@ static void req_preprocess(struct vfs_request *req, size_t max_len) { } -static int handle(struct vfs_request *req, bool *ready) { +static int handle(struct vfs_request *req) { assert(req->caller); switch (req->type) { case VFSOP_OPEN: @@ -132,11 +130,7 @@ static int handle(struct vfs_request *req, bool *ready) { static void accept(struct vfs_request *req) { if (req->caller) { - bool ready = true; - int ret = handle(req, &ready); - if (ready) { - vfsreq_finish(req, ret); - } + vfsreq_finish(req, handle(req)); } else { vfsreq_finish(req, -1); } diff --git a/src/kernel/vfs/root.h b/src/kernel/arch/i386/driver/fsroot.h index dd72202..dd72202 100644 --- a/src/kernel/vfs/root.h +++ b/src/kernel/arch/i386/driver/fsroot.h diff --git a/src/kernel/vfs/request.c b/src/kernel/vfs/request.c index 0c3084d..516e6e0 100644 --- a/src/kernel/vfs/request.c +++ b/src/kernel/vfs/request.c @@ -1,9 +1,9 @@ +#include <kernel/arch/i386/driver/fsroot.h> #include <kernel/mem/alloc.h> #include <kernel/mem/virt.h> #include <kernel/panic.h> #include <kernel/proc.h> #include <kernel/vfs/request.h> -#include <kernel/vfs/root.h> #include <shared/mem.h> void vfsreq_create(struct vfs_request req_) { |