diff options
author | dzwdz | 2021-08-25 14:28:53 +0200 |
---|---|---|
committer | dzwdz | 2021-08-25 14:28:53 +0200 |
commit | ab5150478dd14c1c5b28ca50b36b35e8224df54b (patch) | |
tree | e4998413332229459b7037871924c0d9e811252d /src/kernel/vfs/mount.c | |
parent | 3ac131ea956fd62df966bac75e8d7f0c0434d68d (diff) |
implement vfs_mount_seed, which creates the vfs passed to init
Diffstat (limited to 'src/kernel/vfs/mount.c')
-rw-r--r-- | src/kernel/vfs/mount.c | 15 |
1 files changed, 15 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; +} |