nshlib: Call BOARDIOC_FINALINIT in nsh_telnetstart if CONFIG_NSH_CONSOLE not define

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2020-04-19 23:05:09 +08:00 committed by patacongo
parent b1b45de3db
commit a82d74b8a1

View File

@ -259,13 +259,21 @@ int nsh_telnetstart(sa_family_t family)
/* Execute the startup script. If standard console is also defined,
* then we will not bother with the initscript here (although it is
* safe to call nshinitscript multiple times).
* safe to call nsh_initscript multiple times).
*/
#if defined(CONFIG_NSH_ROMFSETC) && !defined(CONFIG_NSH_CONSOLE)
nsh_initscript(vtbl);
#endif
/* Perform architecture-specific final-initialization(if configured) */
#if defined(CONFIG_NSH_ARCHINIT) && \
defined(CONFIG_BOARDCTL_FINALINIT) && \
!defined(CONFIG_NSH_CONSOLE)
boardctl(BOARDIOC_FINALINIT, 0);
#endif
/* Configure the telnet daemon */
config.d_port = HTONS(CONFIG_NSH_TELNETD_PORT);