You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ar...@apache.org on 2021/01/13 08:40:29 UTC
[incubator-nuttx-apps] branch master updated (756dc32 -> 6aca601)
This is an automated email from the ASF dual-hosted git repository.
archer pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git.
from 756dc32 netutils/iperf: Add iperf example.
new 6ddbffd examples/pty_test: Remove O_NONBLOCK from open
new 6aca601 nsh: Pass the correct command lines to nsh_consolemain
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
examples/pty_test/pty_test.c | 10 ++++------
system/adb/shell_pipe.c | 2 +-
2 files changed, 5 insertions(+), 7 deletions(-)
[incubator-nuttx-apps] 02/02: nsh: Pass the correct command lines
to nsh_consolemain
Posted by ar...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
archer pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git
commit 6aca60133c663cae0de8fa31a64b472f8675fcbb
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sun Jan 3 23:55:39 2021 -0800
nsh: Pass the correct command lines to nsh_consolemain
Change-Id: Ic6617cecb6949054e6bdce8757523e7a60d83eb0
Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
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 8bfbc72..ffa09ee 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 1cf8dc2..762476b 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 */
[incubator-nuttx-apps] 01/02: examples/pty_test: Remove O_NONBLOCK
from open
Posted by ar...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
archer pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git
commit 6ddbffd2000fb62c71914c6f57c93f2e7d1f50e8
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sun Jan 3 23:50:50 2021 -0800
examples/pty_test: Remove O_NONBLOCK from open
to avoid the log storm:
ERROR Failed to read from serial: 11
ERROR Failed to read from serial: 11
ERROR Failed to read from serial: 11
ERROR Failed to read from serial: 11
ERROR Failed to read from serial: 11
...
Change-Id: I821743411c33b5412165f1e9020b6c9ce6c24660
Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
examples/pty_test/pty_test.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/examples/pty_test/pty_test.c b/examples/pty_test/pty_test.c
index 4955213..8bfbc72 100644
--- a/examples/pty_test/pty_test.c
+++ b/examples/pty_test/pty_test.c
@@ -302,7 +302,7 @@ int main(int argc, FAR char *argv[])
/* Open the created pts */
- fd_pts = open(buffer, O_RDWR | O_NONBLOCK);
+ fd_pts = open(buffer, O_RDWR);
if (fd_pts < 0)
{
fprintf(stderr, "ERROR: Failed to open %s: %d\n", buffer, errno);
@@ -311,8 +311,7 @@ int main(int argc, FAR char *argv[])
/* Open the second serial port to create a new console there */
- termpair.fd_uart = open(CONFIG_EXAMPLES_PTYTEST_SERIALDEV,
- O_RDWR | O_NONBLOCK);
+ termpair.fd_uart = open("/dev/console", O_RDWR);
if (termpair.fd_uart < 0)
{
#ifdef CONFIG_EXAMPLES_PTYTEST_WAIT_CONNECTED
@@ -328,8 +327,7 @@ int main(int argc, FAR char *argv[])
{
sleep(1);
- termpair.fd_uart = open(CONFIG_EXAMPLES_PTYTEST_SERIALDEV,
- O_RDWR | O_NONBLOCK);
+ termpair.fd_uart = open(CONFIG_EXAMPLES_PTYTEST_SERIALDEV, O_RDWR);
}
/* if we exited due to an error different than ENOTCONN */