summaryrefslogtreecommitdiff
path: root/src/kernel/vfs/root.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/vfs/root.c')
-rw-r--r--src/kernel/vfs/root.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/kernel/vfs/root.c b/src/kernel/vfs/root.c
new file mode 100644
index 0000000..c90557b
--- /dev/null
+++ b/src/kernel/vfs/root.c
@@ -0,0 +1,16 @@
+#include <kernel/vfs/root.h>
+#include <kernel/util.h>
+#include <kernel/panic.h>
+
+int vfs_root_handler(struct vfs_op_request *req) {
+ switch (req->op.type) {
+ case VFSOP_OPEN:
+ if (req->op.open.path_len == 4
+ && !memcmp(req->op.open.path, "/tty", 4)) {
+ return 0;
+ }
+ return -1;
+ default:
+ panic();
+ }
+}