Mostly cosmetic changes from Uros

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3575 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2011-05-07 19:22:15 +00:00
parent e7cd5acf31
commit a2ac5f8bf4
2 changed files with 66 additions and 49 deletions

View File

@@ -465,6 +465,19 @@ static int nsh_execute(FAR struct nsh_vtbl_s *vtbl, int argc, char *argv[])
*/
cmd = argv[0];
/* Try to find a command in the application library.
*/
#ifdef CONFIG_NSH_BUILTIN_APPS
if (nsh_execapp(vtbl, cmd, argv) == OK)
{
/* The pre-built application was successfully started -- return OK. */
return OK;
}
#endif
/* See if the command is one that we understand */
@@ -503,21 +516,6 @@ static int nsh_execute(FAR struct nsh_vtbl_s *vtbl, int argc, char *argv[])
}
}
/* If the command was not found, then try to execute the command from
* a list of pre-built applications.
*/
#ifdef CONFIG_NSH_BUILTIN_APPS
if (handler == cmd_unrecognized && nsh_execapp(vtbl, cmd, argv) == OK)
{
/* The pre-built application was successfully started -- return OK.
* If not, then fall through to execute the cmd_nrecognized handler.
*/
return OK;
}
#endif
ret = handler(vtbl, argc, argv);
return ret;
}