diff options
author | dzwdz | 2022-05-05 21:01:25 +0200 |
---|---|---|
committer | dzwdz | 2022-05-05 21:01:25 +0200 |
commit | dc42353f53df0b5425377330f16e668829d8fd9a (patch) | |
tree | 7d2af922417df9e0a708007e17bcce1ef2833b99 /src/kernel/vfs/mount.c | |
parent | 3beaeaadf36de4e494d0b40ad31e3c5c503c596e (diff) |
kernel: ps2 driver is now a separate backend
Diffstat (limited to 'src/kernel/vfs/mount.c')
-rw-r--r-- | src/kernel/vfs/mount.c | 22 |
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( |