From 1fd0a40d9d0978fdfa8dae6e221c08b650a5224b Mon Sep 17 00:00:00 2001 From: INSUN PYO Date: Thu, 9 Dec 2021 17:06:53 +0900 Subject: [PATCH] uart: remove O_NONBLOCK flag Sometimes, peripheral_uart_read() returns -EAGAIN. If you retry it many times, it returns correct value. Change-Id: I2a7f9aacc7d0ca47ca06cca52382c0185c76f4fb --- src/peripheral_uart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/peripheral_uart.c b/src/peripheral_uart.c index 8453095..2e86a28 100644 --- a/src/peripheral_uart.c +++ b/src/peripheral_uart.c @@ -120,7 +120,7 @@ int peripheral_uart_open_flags(int port, peripheral_open_flags_e flags, peripher }; char path[DEV_PATH_FMT_MAX_SIZE] = {0, }; /* space for /dev/ttyXXX%d */ - const int FLAGS = O_RDWR | O_NOCTTY | O_NONBLOCK | O_CLOEXEC; + const int FLAGS = O_RDWR | O_NOCTTY | O_CLOEXEC; int fd = -1; int retval = peripheral_uart_find_devpath(port, path, DEV_PATH_FMT_MAX_SIZE); -- 2.7.4