nshlib: Call nsh_sysinitscript in usb or alt console like normal one
forget in the pull request: https://github.com/apache/incubator-nuttx-apps/pull/1142 Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
893387b2c5
commit
cf70d8f95b
@ -257,12 +257,10 @@ int nsh_consolemain(int argc, FAR char *argv[])
|
|||||||
usbtrace_enable(TRACE_BITSET);
|
usbtrace_enable(TRACE_BITSET);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Execute the one-time start-up script.
|
#if defined(CONFIG_NSH_ROMFSETC) && !defined(CONFIG_NSH_DISABLESCRIPT)
|
||||||
* Any output will go to /dev/console.
|
/* Execute the system init script */
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef CONFIG_NSH_ROMFSETC
|
nsh_sysinitscript(&pstate->cn_vtbl);
|
||||||
nsh_initscript(&pstate->cn_vtbl);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_NSH_NETINIT
|
#ifdef CONFIG_NSH_NETINIT
|
||||||
@ -277,10 +275,17 @@ int nsh_consolemain(int argc, FAR char *argv[])
|
|||||||
boardctl(BOARDIOC_FINALINIT, 0);
|
boardctl(BOARDIOC_FINALINIT, 0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Execute the one-time start-up script.
|
||||||
|
* Any output will go to /dev/console.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef CONFIG_NSH_ROMFSETC
|
||||||
|
nsh_initscript(&pstate->cn_vtbl);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* First map stderr and stdout to alternative devices */
|
/* First map stderr and stdout to alternative devices */
|
||||||
|
|
||||||
ret = nsh_clone_console(pstate);
|
ret = nsh_clone_console(pstate);
|
||||||
|
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -284,10 +284,10 @@ int nsh_consolemain(int argc, FAR char *argv[])
|
|||||||
nsh_nullstdio();
|
nsh_nullstdio();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Execute the one-time start-up script (output may go to /dev/null) */
|
#if defined(CONFIG_NSH_ROMFSETC) && !defined(CONFIG_NSH_DISABLESCRIPT)
|
||||||
|
/* Execute the system init script */
|
||||||
|
|
||||||
#ifdef CONFIG_NSH_ROMFSETC
|
nsh_sysinitscript(&pstate->cn_vtbl);
|
||||||
nsh_initscript(&pstate->cn_vtbl);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_NSH_NETINIT
|
#ifdef CONFIG_NSH_NETINIT
|
||||||
@ -302,6 +302,12 @@ int nsh_consolemain(int argc, FAR char *argv[])
|
|||||||
boardctl(BOARDIOC_FINALINIT, 0);
|
boardctl(BOARDIOC_FINALINIT, 0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Execute the one-time start-up script (output may go to /dev/null) */
|
||||||
|
|
||||||
|
#ifdef CONFIG_NSH_ROMFSETC
|
||||||
|
nsh_initscript(&pstate->cn_vtbl);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Now loop, executing creating a session for each USB connection */
|
/* Now loop, executing creating a session for each USB connection */
|
||||||
|
|
||||||
for (; ; )
|
for (; ; )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user