nshlib: Make nsh_telnetmain() in public

Summary:
- This commit makes nsh_telnetmain() in public so that we can
  call it from applications.
- Also, CONFIG_NSH_DISABLE_TELNETSTART is introduced so that
  we can disable nsh_telnetstart()

Impact:
- nsh with telnet daemon

Testing:
- Tested with sabre-6quad:netknsh (will be updated later)

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
This commit is contained in:
Masayuki Ishikawa
2022-08-05 14:37:28 +09:00
committed by Xiang Xiao
parent 000d1455b4
commit 3f70a78dd3
3 changed files with 31 additions and 6 deletions

View File

@@ -126,6 +126,27 @@ void nsh_initialize(void);
int nsh_consolemain(int argc, FAR char *argv[]);
/****************************************************************************
* Name: nsh_telnetmain
*
* Description:
* This interface may be called or started with task_start to start a
* single NSH instance that operates on stdin and stdout for telnet daemon.
* This function does not return.
*
* Input Parameters:
* Standard task start-up arguments. These are not used. argc may be
* zero and argv may be NULL.
*
* Returned Values:
* This function does not normally return. exit() is usually called to
* terminate the NSH session. This function will return in the event of
* an error. In that case, a non-zero value is returned (EXIT_FAILURE=1).
****************************************************************************/
int nsh_telnetmain(int argc, FAR char *argv[]);
/****************************************************************************
* Name: nsh_telnetstart
*