From 6aca60133c663cae0de8fa31a64b472f8675fcbb Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Sun, 3 Jan 2021 23:55:39 -0800 Subject: [PATCH] nsh: Pass the correct command lines to nsh_consolemain Change-Id: Ic6617cecb6949054e6bdce8757523e7a60d83eb0 Signed-off-by: Xiang Xiao --- examples/pty_test/pty_test.c | 2 +- system/adb/shell_pipe.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/pty_test/pty_test.c b/examples/pty_test/pty_test.c index 8bfbc7297..ffa09eedc 100644 --- a/examples/pty_test/pty_test.c +++ b/examples/pty_test/pty_test.c @@ -382,7 +382,7 @@ int main(int argc, FAR char *argv[]) pid = task_create("NSH Console", CONFIG_EXAMPLES_PTYTEST_DAEMONPRIO, CONFIG_EXAMPLES_PTYTEST_STACKSIZE, nsh_consolemain, - argv); + &argv[1]); if (pid < 0) { /* Can't do output because stdout and stderr are redirected */ diff --git a/system/adb/shell_pipe.c b/system/adb/shell_pipe.c index 1cf8dc2f5..762476bab 100644 --- a/system/adb/shell_pipe.c +++ b/system/adb/shell_pipe.c @@ -230,7 +230,7 @@ int shell_pipe_exec(char * const argv[], shell_pipe_t *apipe, ret = task_create("ADB shell", CONFIG_SYSTEM_NSH_PRIORITY, CONFIG_SYSTEM_NSH_STACKSIZE, nsh_consolemain, - argv); + &argv[1]); /* Close stdin and stdout */