diff options
Diffstat (limited to 'src/kernel/vfs')
-rw-r--r-- | src/kernel/vfs/mount.c | 15 | ||||
-rw-r--r-- | src/kernel/vfs/mount.h | 3 |
2 files changed, 18 insertions, 0 deletions
diff --git a/src/kernel/vfs/mount.c b/src/kernel/vfs/mount.c new file mode 100644 index 0000000..be33b6b --- /dev/null +++ b/src/kernel/vfs/mount.c @@ -0,0 +1,15 @@ +#include <kernel/mem.h> +#include <kernel/vfs/mount.h> + +struct vfs_mount *vfs_mount_seed(void) { + struct vfs_mount *mount = kmalloc(sizeof(struct vfs_mount)); + *mount = (struct vfs_mount){ + .prev = NULL, + .prefix = "/tty", + .prefix_len = 4, + .fd = { + .type = FD_SPECIAL_TTY, + }, + }; + return mount; +} diff --git a/src/kernel/vfs/mount.h b/src/kernel/vfs/mount.h index 3e9d8ae..982f951 100644 --- a/src/kernel/vfs/mount.h +++ b/src/kernel/vfs/mount.h @@ -7,3 +7,6 @@ struct vfs_mount { size_t prefix_len; struct fd fd; }; + +// prepares init's filesystem view +struct vfs_mount *vfs_mount_seed(void); |