mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-01 20:29:00 +00:00
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 <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
756dc32fd0
commit
6ddbffd200
1 changed files with 3 additions and 5 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue