summaryrefslogtreecommitdiff
path: root/src/kernel/arch/amd64/driver/fsroot.c
diff options
context:
space:
mode:
authordzwdz2022-08-04 23:06:57 +0200
committerdzwdz2022-08-04 23:06:57 +0200
commitce00d1677d7a419b427e7f11963eee982a55a231 (patch)
tree2662c3861226f6909b83d57ff8b6ac3b2ba5ec8d /src/kernel/arch/amd64/driver/fsroot.c
parent26dc784103914b9d6ba36e0a96fa4b3af977626f (diff)
do some simple TODOs, organize the rest; general code maintainance
Diffstat (limited to 'src/kernel/arch/amd64/driver/fsroot.c')
-rw-r--r--src/kernel/arch/amd64/driver/fsroot.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/kernel/arch/amd64/driver/fsroot.c b/src/kernel/arch/amd64/driver/fsroot.c
index 512b7da..41fe136 100644
--- a/src/kernel/arch/amd64/driver/fsroot.c
+++ b/src/kernel/arch/amd64/driver/fsroot.c
@@ -2,6 +2,7 @@
#include <camellia/fsutil.h>
#include <kernel/arch/amd64/ata.h>
#include <kernel/arch/amd64/driver/fsroot.h>
+#include <kernel/arch/amd64/driver/util.h>
#include <kernel/mem/virt.h>
#include <kernel/panic.h>
#include <kernel/proc.h>
@@ -22,17 +23,6 @@ static bool exacteq(struct vfs_request *req, const char *str) {
return req->input.len == len && !memcmp(req->input.buf_kern, str, len);
}
-static int req_readcopy(struct vfs_request *req, const void *buf, size_t len) {
- assert(req->type == VFSOP_READ);
- fs_normslice(&req->offset, &req->output.len, len, false);
- virt_cpy_to(
- req->caller->pages, req->output.buf,
- buf + req->offset, req->output.len);
- /* read errors are ignored. TODO write docs */
- return req->output.len;
-}
-
-
static int handle(struct vfs_request *req) {
assert(req->caller);
int id = (int)(long __force)req->id;