summaryrefslogtreecommitdiffstats
path: root/src/sys
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/sys
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/sys')
-rw-r--r--src/sys/init/init_main.C2
-rw-r--r--src/sys/vfs/vfs_main.C22
2 files changed, 14 insertions, 10 deletions
diff --git a/src/sys/init/init_main.C b/src/sys/init/init_main.C
index ffc552dad..96fea57a8 100644
--- a/src/sys/init/init_main.C
+++ b/src/sys/init/init_main.C
@@ -50,7 +50,7 @@ void init_main(void* unused)
// run initialization service to start up everything else.
printk("init_main: Starting Initialization Service...\n");
tidrc = task_exec( "libinitservice.so", NULL );
- if ( (int16_t)tidrc < 0 ) // task_exec returned a -1
+ if ( (int16_t)tidrc < 0 ) // task_exec returned an error.
{
printk( "ERROR: init_main: failed to launch initservice: %d\n", tidrc );
diff --git a/src/sys/vfs/vfs_main.C b/src/sys/vfs/vfs_main.C
index 599668cc3..06a7f9d07 100644
--- a/src/sys/vfs/vfs_main.C
+++ b/src/sys/vfs/vfs_main.C
@@ -21,6 +21,7 @@
//
// IBM_PROLOG_END
#include <string.h>
+#include <errno.h>
#include <sys/msg.h>
#include <sys/vfs.h>
@@ -34,7 +35,7 @@ const char* VFS_ROOT = "/";
const char* VFS_ROOT_BIN = "/bin/";
const char* VFS_ROOT_DATA = "/data/";
const char* VFS_ROOT_MSG = "/msg/";
-const char* VFS_MSG = "/vfs/";
+const char* VFS_ROOT_MSG_VFS = "/msg/vfs";
void vfs_module_init();
@@ -42,7 +43,9 @@ void vfs_module_init();
* Call the module start routine
* @param[in] i_module VfsSystemModule data for the module
* @param[in] i_param parameter to pass to task_create() for this module
- * @return tid_t of started task | -1 if i_module is NULL | -2 if there is no start()
+ * @return tid_t of started task or negative value on error.
+ * @retval -ENOENT if i_module is NULL
+ * @retval -ENOEXEC if there is no start()
*/
tid_t vfs_exec(VfsSystemModule * i_module, void* i_param);
@@ -122,13 +125,14 @@ void vfs_main(void* i_barrier)
tid_t child = vfs_exec(module,(void*) msg->data[1]);
- // child == -1 means module not found in base image so send
- // a message to VFS_MSG queue to look in the extended image
- // VFS_MSG queue will handle the msg_respond()
- if( child == (tid_t)-1 ) // forward msg to usr vfs
+ // child == -ENOENT means module not found in base image
+ // so send a message to VFS_MSG queue to look in the
+ // extended image VFS_MSG queue will handle the
+ // msg_respond()
+ if( child == (tid_t)-ENOENT ) // forward msg to usr vfs
{
VfsEntry::key_type k;
- strcpy(k.key, VFS_MSG);
+ strcpy(k.key, VFS_ROOT_MSG_VFS);
VfsEntry* e = vfsContents.find(k);
if(e != NULL)
{
@@ -163,12 +167,12 @@ void vfs_main(void* i_barrier)
tid_t vfs_exec(VfsSystemModule * i_module, void* i_param)
{
- tid_t child = -1;
+ tid_t child = -ENOENT;
if(i_module != NULL)
{
if (i_module->start == NULL)
{
- child = -2; // module has no start() routine
+ child = -ENOEXEC; // module has no start() routine
}
else
{
OpenPOWER on IntegriCloud