summaryrefslogtreecommitdiff
path: root/apps/nshlib/nsh_parse.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-05-07 19:22:15 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-05-07 19:22:15 +0000
commitca700d2e3c06a80de37c5ef8383ca550fe20c750 (patch)
treed486856c6dafe9c6271b7808caaa4920bef63474 /apps/nshlib/nsh_parse.c
parentb238002998250df997560fac2b0f18550f998855 (diff)
downloadnuttx-ca700d2e3c06a80de37c5ef8383ca550fe20c750.tar.gz
nuttx-ca700d2e3c06a80de37c5ef8383ca550fe20c750.tar.bz2
nuttx-ca700d2e3c06a80de37c5ef8383ca550fe20c750.zip
Mostly cosmetic changes from Uros
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3575 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'apps/nshlib/nsh_parse.c')
-rw-r--r--apps/nshlib/nsh_parse.c28
1 files changed, 13 insertions, 15 deletions
diff --git a/apps/nshlib/nsh_parse.c b/apps/nshlib/nsh_parse.c
index 650ef5732..ef861b2de 100644
--- a/apps/nshlib/nsh_parse.c
+++ b/apps/nshlib/nsh_parse.c
@@ -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;
}