Gregory Nutt is has submitted the SGA
Uros Platise has submitted the ICLA
as a result we can migrate the licenses to Apache.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
set the config:
CONFIG_NSH_ROMFSETC=y
CONFIG_NSH_CONSOLE=n
nsh_telnetd.c: In function 'nsh_telnetstart':
nsh_telnetd.c:267:22: error: 'vtbl' undeclared (first use in this function)
267 | nsh_initscript(vtbl);
| ^~~~
Signed-off-by: chao.an <anchao@xiaomi.com>
1.Remove void cast for function because many place ignore the returned value witout cast
2.Replace void cast for variable with UNUSED macro
Change-Id: Ie644129a563244a6397036789c4c3ea83c4e9b09
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
> cat /dev/ttyCP &
> echo ls >/dev/ttyCP
Can't get the 'ls' result immediately, because 'cat' cmd uses nsh_consolewrite() and that uses fwrite with no fflush. We can get the 'ls' result after type '\n', because nsh will fflush output when get '\n'.
Set the 'exit on error control' and/or 'print a trace' of commands when parsing scripts in NSH. The settinngs are in effect from the point of exection, until they are changed again, or in the case of the init script, the settings are returned to the default settings when it exits.
Included child scripts will run with the parents settings and changes made in the child script will effect the parent on return.
Use 'set -e' to enable and 'set +e' to disable (ignore) the exit condition on commands. The default is -e. Errors cause script to exit.
Use 'set -x' to enable and 'set +x' to disable (silence) printing a trace of the script commands as they are ececuted. The default is +x. No printing of a trace of script commands as they are executed.