mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-10-19 11:23:07 +08:00
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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user