From: INSUN PYO Date: Thu, 9 Dec 2021 08:06:53 +0000 (+0900) Subject: uart: remove O_NONBLOCK flag X-Git-Tag: submit/tizen/20211209.090954^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F26%2F267726%2F3;p=platform%2Fcore%2Fapi%2Fperipheral-io.git uart: remove O_NONBLOCK flag Sometimes, peripheral_uart_read() returns -EAGAIN. If you retry it many times, it returns correct value. Change-Id: I2a7f9aacc7d0ca47ca06cca52382c0185c76f4fb --- 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);