mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-10-17 07:12:06 +08:00
nshlib: Reuse nsh_session logic in nsh_telnetmain
to avoid the code duplication Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:

committed by
Alan Carvalho de Assis

parent
8e460e7e19
commit
75455d3788
@@ -647,6 +647,13 @@
|
||||
* Public Types
|
||||
****************************************************************************/
|
||||
|
||||
enum nsh_login_e
|
||||
{
|
||||
NSH_LOGIN_NONE = 0, /* Don't Performs the login sequence */
|
||||
NSH_LOGIN_LOCAL, /* Performs the login sequence as local user */
|
||||
NSH_LOGIN_TELNET /* Performs the login sequence as telnet client */
|
||||
};
|
||||
|
||||
#ifndef CONFIG_NSH_DISABLE_ITEF
|
||||
/* State when parsing and if-then-else sequence */
|
||||
|
||||
@@ -866,7 +873,7 @@ int nsh_loginscript(FAR struct nsh_vtbl_s *vtbl);
|
||||
|
||||
struct console_stdio_s;
|
||||
int nsh_session(FAR struct console_stdio_s *pstate,
|
||||
bool login, int argc, FAR char *argv[]);
|
||||
int login, int argc, FAR char *argv[]);
|
||||
int nsh_parse(FAR struct nsh_vtbl_s *vtbl, FAR char *cmdline);
|
||||
|
||||
/****************************************************************************
|
||||
|
Reference in New Issue
Block a user