diff options
author | dzwdz | 2021-09-12 18:31:15 +0200 |
---|---|---|
committer | dzwdz | 2021-09-12 18:31:15 +0200 |
commit | d789f43bb82b8c43f0e8a5a53a4ce8b30d1c0984 (patch) | |
tree | c07b0e5aafbeeedfc9ffcb9eb981b3f5c7059c2d /src/init | |
parent | 5194b7f3a6eadc7439d28da6e2a49330ccd273a9 (diff) |
first working access function!
Diffstat (limited to 'src/init')
-rw-r--r-- | src/init/main.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/init/main.c b/src/init/main.c index f31da02..28bb4a7 100644 --- a/src/init/main.c +++ b/src/init/main.c @@ -42,6 +42,7 @@ void fs_test(void) { log("requesting file. "); file = _syscall_open(argify("/mnt/tty")); log("open returned. "); + _syscall_write(file, argify("hello")); } void fs_server(handle_t back) { @@ -55,6 +56,15 @@ void fs_server(handle_t back) { log(" was opened. "); _syscall_fs_respond(0, NULL, 0); // doesn't check the path yet break; + + case VFSOP_WRITE: + // uppercase the buffer + for (int i = 0; i < len; i++) buf[i] &= ~32; + // and passthrough to tty + _syscall_write(tty_fd, buf, len); + _syscall_fs_respond(len, NULL, 0); // return the amt of bytes written + break; + default: log("fuck"); break; |