nshlib: Ensure nsh_initscript always follow usbtrace_enable immediately
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
b813944a7a
commit
6c4dc44e04
@ -86,6 +86,12 @@ int nsh_consolemain(int argc, char *argv[])
|
|||||||
|
|
||||||
DEBUGASSERT(pstate != NULL);
|
DEBUGASSERT(pstate != NULL);
|
||||||
|
|
||||||
|
#ifdef CONFIG_NSH_USBDEV_TRACE
|
||||||
|
/* Initialize any USB tracing options that were requested */
|
||||||
|
|
||||||
|
usbtrace_enable(TRACE_BITSET);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_NSH_ROMFSETC
|
#ifdef CONFIG_NSH_ROMFSETC
|
||||||
/* Execute the start-up script */
|
/* Execute the start-up script */
|
||||||
|
|
||||||
@ -104,12 +110,6 @@ int nsh_consolemain(int argc, char *argv[])
|
|||||||
netinit_bringup();
|
netinit_bringup();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_NSH_USBDEV_TRACE
|
|
||||||
/* Initialize any USB tracing options that were requested */
|
|
||||||
|
|
||||||
usbtrace_enable(TRACE_BITSET);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_NSH_ARCHINIT) && defined(CONFIG_BOARDCTL_FINALINIT)
|
#if defined(CONFIG_NSH_ARCHINIT) && defined(CONFIG_BOARDCTL_FINALINIT)
|
||||||
/* Perform architecture-specific final-initialization (if configured) */
|
/* Perform architecture-specific final-initialization (if configured) */
|
||||||
|
|
||||||
|
@ -127,15 +127,6 @@ static int nsh_telnetmain(int argc, char *argv[])
|
|||||||
|
|
||||||
fflush(pstate->cn_outstream);
|
fflush(pstate->cn_outstream);
|
||||||
|
|
||||||
/* 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).
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if defined(CONFIG_NSH_ROMFSETC) && !defined(CONFIG_NSH_CONSOLE)
|
|
||||||
nsh_initscript(vtbl);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Execute the login script */
|
/* Execute the login script */
|
||||||
|
|
||||||
#ifdef CONFIG_NSH_ROMFSRC
|
#ifdef CONFIG_NSH_ROMFSRC
|
||||||
@ -266,6 +257,15 @@ int nsh_telnetstart(sa_family_t family)
|
|||||||
usbtrace_enable(TRACE_BITSET);
|
usbtrace_enable(TRACE_BITSET);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* 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).
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if defined(CONFIG_NSH_ROMFSETC) && !defined(CONFIG_NSH_CONSOLE)
|
||||||
|
nsh_initscript(vtbl);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Configure the telnet daemon */
|
/* Configure the telnet daemon */
|
||||||
|
|
||||||
config.d_port = HTONS(CONFIG_NSH_TELNETD_PORT);
|
config.d_port = HTONS(CONFIG_NSH_TELNETD_PORT);
|
||||||
|
Loading…
Reference in New Issue
Block a user