summaryrefslogtreecommitdiffstats
path: root/src/sys/vfs/vfs_init.C
diff options
context:
space:
mode:
Diffstat (limited to 'src/sys/vfs/vfs_init.C')
-rw-r--r--src/sys/vfs/vfs_init.C39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/sys/vfs/vfs_init.C b/src/sys/vfs/vfs_init.C
new file mode 100644
index 000000000..24c55fda9
--- /dev/null
+++ b/src/sys/vfs/vfs_init.C
@@ -0,0 +1,39 @@
+#include <sys/vfs.h>
+#include <kernel/console.H>
+
+VfsSystemModule VFS_MODULES[VFS_MODULE_MAX];
+uint64_t VFS_LAST_ADDRESS;
+
+void vfs_module_init()
+{
+ printk("Initializing modules.\n");
+
+ VfsSystemModule* module = &VFS_MODULES[0];
+ while ('\0' != module->module[0])
+ {
+ printk("\tIniting module %s...", module->module);
+ if (NULL != module->init)
+ (module->init)(NULL);
+ printk("done.\n");
+
+ module++;
+ }
+
+ printk("Modules initialized.");
+}
+
+void (*vfs_module_find_start(const char* modName))(void*)
+{
+ VfsSystemModule* module = &VFS_MODULES[0];
+ while ('\0' != module->module[0])
+ {
+ if (0 == strcmp(modName, module->module))
+ {
+ return module->start;
+ }
+
+ module++;
+ }
+
+ return NULL;
+}
OpenPOWER on IntegriCloud