From 426dc74b959df16ea2c63ddefb07aa874a17a367 Mon Sep 17 00:00:00 2001 From: patacongo Date: Thu, 2 Feb 2012 16:04:09 +0000 Subject: NSH now uses the new Telnet daemon and built-in tasks started by NSH can be used over Telnet git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4361 42af7a65-404d-4744-a932-0658087f49c3 --- apps/nshlib/nsh_parse.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'apps/nshlib/nsh_parse.c') diff --git a/apps/nshlib/nsh_parse.c b/apps/nshlib/nsh_parse.c index cc0443258..cec167f05 100644 --- a/apps/nshlib/nsh_parse.c +++ b/apps/nshlib/nsh_parse.c @@ -64,6 +64,7 @@ #include #include "nsh.h" +#include "nsh_console.h" /**************************************************************************** * Definitions @@ -463,7 +464,7 @@ static int cmd_unrecognized(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) #ifndef CONFIG_NSH_DISABLE_EXIT static int cmd_exit(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) { - nsh_exit(vtbl); + nsh_exit(vtbl, 0); return OK; } #endif @@ -1018,6 +1019,18 @@ static inline int nsh_nice(FAR struct nsh_vtbl_s *vtbl, FAR char **ppcmd, FAR ch /**************************************************************************** * Name: nsh_initialize + * + * Description: + * This nterfaces is used to initialize the NuttShell (NSH). + * nsh_initialize() should be called one during application start-up prior + * to executing either nsh_consolemain() or nsh_telnetstart(). + * + * Input Parameters: + * None + * + * Returned Value: + * None + * ****************************************************************************/ void nsh_initialize(void) @@ -1037,6 +1050,10 @@ void nsh_initialize(void) /**************************************************************************** * Name: nsh_parse + * + * Description: + * This function parses and executes one NSH command. + * ****************************************************************************/ int nsh_parse(FAR struct nsh_vtbl_s *vtbl, char *cmdline) -- cgit v1.2.3