diff options
author | Patrick Williams <iawillia@us.ibm.com> | 2011-03-05 10:01:45 -0600 |
---|---|---|
committer | Patrick Williams <iawillia@us.ibm.com> | 2011-03-05 10:01:45 -0600 |
commit | 706243ac48cf646d503a3f1ec9e6a28c916694bd (patch) | |
tree | 5d583486a145a9646eccb9d3c4bce4dad45a2a84 /src/sys/vfs/vfs_init.C | |
parent | 5c20d316d21e231daee6455f0a78d5940d59cf23 (diff) | |
download | talos-hostboot-706243ac48cf646d503a3f1ec9e6a28c916694bd.tar.gz talos-hostboot-706243ac48cf646d503a3f1ec9e6a28c916694bd.zip |
Merge of PowerHAL project up to commit:
dd45c30bd53d8e6c123165b83842d08117558a3c
Diffstat (limited to 'src/sys/vfs/vfs_init.C')
-rw-r--r-- | src/sys/vfs/vfs_init.C | 39 |
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; +} |