summaryrefslogtreecommitdiffstats
path: root/src/sys/vfs/vfs_init.C
blob: 24c55fda9ef8b768c45d53e82e889a07d53b38f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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