summaryrefslogtreecommitdiffstats
path: root/src/sys/vfs
diff options
context:
space:
mode:
authorMark Wenning <wenning@us.ibm.com>2011-06-06 14:07:51 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2011-06-21 17:54:41 -0500
commita2fbc8cb2e51821331f3ba8d920dddf8ab0fb96d (patch)
treea8f2b80dd70837255c2012f86917cb1f9e8c415a /src/sys/vfs
parenta1450c913cb7864234ae1adea8aaffe561a627d6 (diff)
downloadtalos-hostboot-a2fbc8cb2e51821331f3ba8d920dddf8ab0fb96d.tar.gz
talos-hostboot-a2fbc8cb2e51821331f3ba8d920dddf8ab0fb96d.zip
Initialization Service (Flow Control)
- save off changes before switch branch - rename to get rid of '_' in filenames. - split into separate files - adding errorlogs, saved off so CC guru could work - fix problem in vfs_main where we would crash if there is no _start in launched task. - refactor - fix problems with coding guidelines - add testcases for startTask and reportError - add fixes from code review Change-Id: I2ae34cb6097c466d4f6d0e41b4b32c2eba47e9df Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/145 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/sys/vfs')
-rw-r--r--src/sys/vfs/vfs_main.C22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/sys/vfs/vfs_main.C b/src/sys/vfs/vfs_main.C
index 22cd306a5..322768fc9 100644
--- a/src/sys/vfs/vfs_main.C
+++ b/src/sys/vfs/vfs_main.C
@@ -26,7 +26,7 @@ struct VfsEntry
typedef VfsPath key_type;
key_type key;
msg_q_t msg_q;
-
+
VfsEntry* next;
VfsEntry* prev;
};
@@ -36,10 +36,10 @@ void vfs_main(void* unused)
// Create message queue, register with kernel.
msg_q_t vfsMsgQ = msg_q_create();
msg_q_register(vfsMsgQ, VFS_ROOT);
-
+
printk("done.\n");
// TODO... barrier with init.
-
+
// Initalize modules.
vfs_module_init();
@@ -73,21 +73,27 @@ void vfs_main(void* unused)
msg->data[0] = (uint64_t) NULL;
else
msg->data[0] = (uint64_t) e->msg_q;
- msg_respond(vfsMsgQ, msg);
+ msg_respond(vfsMsgQ, msg);
}
break;
-
+
case VFS_MSG_EXEC:
{
- printk("VFS: Got exec request of %s\n",
+ printk("VFS: Got exec request of %s\n",
(const char*)msg->data[0]);
VfsSystemModule* module = &VFS_MODULES[0];
tid_t child = -1;
while ('\0' != module->module[0])
{
- if (0 == strcmp((const char*) msg->data[0],
+ if (0 == strcmp((const char*) msg->data[0],
module->module))
{
+ if ( module->start == NULL)
+ {
+ // module has no _start() routine,
+ // return child = -1
+ break;
+ }
child = task_create(module->start,
(void*) msg->data[1]);
break;
@@ -103,5 +109,5 @@ void vfs_main(void* unused)
msg_free(msg);
break;
}
- }
+ } // end while(1)
}
OpenPOWER on IntegriCloud