From 642b5fb0007b64c77d186fcb018d571152ee1d47 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Mon, 14 Aug 2023 18:51:07 +0200 Subject: reorganization: first steps --- src/user/app/logfs/logfs.c | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 src/user/app/logfs/logfs.c (limited to 'src/user/app/logfs/logfs.c') diff --git a/src/user/app/logfs/logfs.c b/src/user/app/logfs/logfs.c deleted file mode 100644 index a50d530..0000000 --- a/src/user/app/logfs/logfs.c +++ /dev/null @@ -1,34 +0,0 @@ -#include -#include -#include -#include -#include -#include - -_Noreturn void fs(void) { - const size_t buflen = 1024; - char *buf = malloc(buflen); - if (!buf) err(1, "malloc"); - for (;;) { - struct ufs_request req; - hid_t reqh = ufs_wait(buf, buflen, &req); - if (reqh < 0) errx(1, "ufs_wait error"); - - switch (req.op) { - case VFSOP_OPEN: - printf("[logfs] open(\"%s\", 0x%x)\n", buf, req.flags); - forward_open(reqh, buf, req.len, req.flags); - break; - default: - /* Unsupported vfs operation. - * Currently if you never create your own file descriptors you won't receive - * anything but VFSOP_OPEN, but it's idiomatic to handle this anyways. */ - _sys_fs_respond(reqh, NULL, -1, 0); - break; - } - } -} - -int main(void) { - fs(); -} -- cgit v1.2.3