summaryrefslogtreecommitdiffstats
path: root/src/sys/vfs
diff options
context:
space:
mode:
authorPatrick Williams <iawillia@us.ibm.com>2011-03-05 10:01:45 -0600
committerPatrick Williams <iawillia@us.ibm.com>2011-03-05 10:01:45 -0600
commit706243ac48cf646d503a3f1ec9e6a28c916694bd (patch)
tree5d583486a145a9646eccb9d3c4bce4dad45a2a84 /src/sys/vfs
parent5c20d316d21e231daee6455f0a78d5940d59cf23 (diff)
downloadtalos-hostboot-706243ac48cf646d503a3f1ec9e6a28c916694bd.tar.gz
talos-hostboot-706243ac48cf646d503a3f1ec9e6a28c916694bd.zip
Merge of PowerHAL project up to commit:
dd45c30bd53d8e6c123165b83842d08117558a3c
Diffstat (limited to 'src/sys/vfs')
-rw-r--r--src/sys/vfs/makefile2
-rw-r--r--src/sys/vfs/vfs_init.C39
-rw-r--r--src/sys/vfs/vfs_main.C23
3 files changed, 43 insertions, 21 deletions
diff --git a/src/sys/vfs/makefile b/src/sys/vfs/makefile
index 767b09204..3567870da 100644
--- a/src/sys/vfs/makefile
+++ b/src/sys/vfs/makefile
@@ -1,5 +1,5 @@
ROOTPATH = ../../..
-OBJS = vfs_main.o
+OBJS = vfs_main.o vfs_init.o
include ${ROOTPATH}/config.mk
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;
+}
diff --git a/src/sys/vfs/vfs_main.C b/src/sys/vfs/vfs_main.C
index 3efb99002..417a8ae14 100644
--- a/src/sys/vfs/vfs_main.C
+++ b/src/sys/vfs/vfs_main.C
@@ -11,8 +11,8 @@ const char* VFS_ROOT = "/";
const char* VFS_ROOT_BIN = "/bin/";
const char* VFS_ROOT_DATA = "/data/";
const char* VFS_ROOT_MSG = "/msg/";
-VfsSystemModule VFS_MODULES[VFS_MODULE_MAX];
-uint64_t VFS_LAST_ADDRESS;
+
+void vfs_module_init();
struct VfsPath
{
@@ -31,23 +31,6 @@ struct VfsEntry
VfsEntry* prev;
};
-void vfs_module_init()
-{
- printk("Initializing modules.\n");
-
- VfsSystemModule* module = &VFS_MODULES[0];
- while ('\0' != module->module[0])
- {
- printk("\tIniting module %s...", module->module);
- (module->init)(NULL);
- printk("done.\n");
-
- module++;
- }
-
- printk("Modules initialized.");
-}
-
void vfs_main(void* unused)
{
// Create message queue, register with kernel.
@@ -75,7 +58,7 @@ void vfs_main(void* unused)
e->msg_q = (msg_q_t) msg->data[0];
vfsContents.insert(e);
- printk("VFS: Registering %lx as %s\n",
+ printk("VFS: Registering %p as %s\n",
e->msg_q, e->key.key);
msg_respond(vfsMsgQ, msg);
}
OpenPOWER on IntegriCloud