From 2fd13e9de7680f6511c60a7af263a8563d796115 Mon Sep 17 00:00:00 2001 From: patacongo Date: Tue, 19 Aug 2008 23:21:56 +0000 Subject: [PATCH] exec'ed function returns a value for 0 git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@833 42af7a65-404d-4744-a932-0658087f49c3 --- examples/nsh/nsh_proccmds.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/examples/nsh/nsh_proccmds.c b/examples/nsh/nsh_proccmds.c index 643e420fbe..cb9f53062e 100644 --- a/examples/nsh/nsh_proccmds.c +++ b/examples/nsh/nsh_proccmds.c @@ -55,7 +55,11 @@ * Private Types ****************************************************************************/ -typedef void (*exec_t)(void); +/* The returned value should be zero for sucess or TRUE or non zero for + * failure or FALSE. + */ + +typedef int (*exec_t)(void); /**************************************************************************** * Private Function Prototypes @@ -152,8 +156,7 @@ int cmd_exec(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) } nsh_output(vtbl, "Calling %p\n", (exec_t)addr); - ((exec_t)addr)(); - return OK; + return ((exec_t)addr)(); } /****************************************************************************