From 70dc7ad8924cf3e30e06b02698b1294fe9553538 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Thu, 18 Sep 2025 22:36:36 -0400 Subject: kern: vfs: Add initial vfsops, and mount code This commit introduces the groundwork for mountpoints, filesystems and the VFS as a whole. OMAR is now initialized as its own filesystem by the VFS Signed-off-by: Ian Moffett --- src/sys/os/os_omar.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'src/sys/os/os_omar.c') diff --git a/src/sys/os/os_omar.c b/src/sys/os/os_omar.c index 63493b0..186ca57 100644 --- a/src/sys/os/os_omar.c +++ b/src/sys/os/os_omar.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include @@ -143,7 +144,7 @@ initrd_get_file(const char *path, struct initrd_node *res) * Initialize the initrd */ static int -initrd_init(void) +initrd_init(struct fs_info *fip) { struct bootvars bootvars; struct bootvar_io *bvio = NULL; @@ -187,13 +188,6 @@ initrd_open(const char *path, char **res) return -ENOENT; } - if (__initrd_root == NULL) { - error = initrd_init(); - if (error < 0) { - panic("initrd: failed to setup initrd\n"); - } - } - error = initrd_get_file(path, &node); if (error < 0) { printf("initrd: failed to open '%s'\n", path); @@ -203,3 +197,7 @@ initrd_open(const char *path, char **res) *res = node.data; return node.size; } + +struct vfsops g_omar_vfsops = { + .init = initrd_init +}; -- cgit v1.2.3