summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorPatrick Williams <iawillia@us.ibm.com>2011-09-12 14:58:16 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2011-09-13 12:44:49 -0500
commitf00cbc2321649c74c078784a1fc47da3b10e1a54 (patch)
treee4bf96f22176dda426bc678602aef25bc95a3564 /src/lib
parent89dc4c2dc72a77bc278b388d66681e943fb6d539 (diff)
downloadtalos-hostboot-f00cbc2321649c74c078784a1fc47da3b10e1a54.tar.gz
talos-hostboot-f00cbc2321649c74c078784a1fc47da3b10e1a54.zip
Return code cleanups.
Change-Id: I375c2f895f28b73948aa384dda781b31f027719b Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/334 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/syscall_task.C14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/lib/syscall_task.C b/src/lib/syscall_task.C
index 2e28afd0e..38b8adee4 100644
--- a/src/lib/syscall_task.C
+++ b/src/lib/syscall_task.C
@@ -27,6 +27,7 @@
#include <kernel/cpu.H>
#include <sys/vfs.h>
#include <sys/msg.h>
+#include <errno.h>
using namespace Systemcalls;
@@ -71,7 +72,8 @@ tid_t task_exec(const char* file, void* ptr)
// The VFS process is responsible for finding the module and creating the
// new process. So, we send a message over to that process.
- tid_t child = -1;
+ tid_t child = 0;
+ int rc = 0;
// Create message, send.
msg_q_t vfsQ = (msg_q_t)_syscall0(MSGQ_RESOLVE_ROOT);
@@ -79,7 +81,15 @@ tid_t task_exec(const char* file, void* ptr)
msg->type = VFS_MSG_EXEC;
msg->data[0] = (uint64_t) file;
msg->data[1] = (uint64_t) ptr;
- int rc = msg_sendrecv(vfsQ, msg);
+ if (vfsQ)
+ {
+ msg_sendrecv(vfsQ, msg);
+ }
+ else
+ {
+ // VFS process isn't fully up yet, return EAGAIN.
+ rc = -EAGAIN;
+ }
if (0 == rc)
{
OpenPOWER on IntegriCloud