summaryrefslogtreecommitdiff
path: root/src/kernel/vfs/mount.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/vfs/mount.c')
-rw-r--r--src/kernel/vfs/mount.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/kernel/vfs/mount.c b/src/kernel/vfs/mount.c
index a6c5970..232e702 100644
--- a/src/kernel/vfs/mount.c
+++ b/src/kernel/vfs/mount.c
@@ -4,6 +4,8 @@
#include <kernel/vfs/root.h>
#include <shared/mem.h>
+#include <kernel/arch/i386/driver/ps2.h>
+
struct vfs_mount *vfs_mount_seed(void) {
struct vfs_mount *mount = kmalloc(sizeof *mount);
struct vfs_backend *backend = kmalloc(sizeof *backend);
@@ -19,7 +21,25 @@ struct vfs_mount *vfs_mount_seed(void) {
.backend = backend,
.refs = 1, // never to be freed
};
- return mount;
+
+ // what a mess.
+ // TODO register funcs
+ struct vfs_mount *ps2 = kmalloc(sizeof *ps2);
+ backend = kmalloc(sizeof *backend);
+ backend->is_user = false;
+ backend->potential_handlers = 1;
+ backend->refcount = 1;
+ backend->kern.ready = vfs_ps2_ready;
+ backend->kern.accept = vfs_ps2_accept;
+ *ps2 = (struct vfs_mount){
+ .prev = mount,
+ .prefix = "/ps2",
+ .prefix_len = 4,
+ .backend = backend,
+ .refs = 1,
+ };
+
+ return ps2;
}
struct vfs_mount *vfs_mount_resolve(