uart: remove O_NONBLOCK flag 26/267726/3 accepted/tizen_7.0_unified_hotfix tizen_7.0_hotfix accepted/tizen/7.0/unified/20221110.060853 accepted/tizen/7.0/unified/hotfix/20221116.104803 accepted/tizen/unified/20211210.115150 submit/tizen/20211209.090954 tizen_7.0_m2_release
authorINSUN PYO <insun.pyo@samsung.com>
Thu, 9 Dec 2021 08:06:53 +0000 (17:06 +0900)
committerHyotaek Shim <hyotaek.shim@samsung.com>
Thu, 9 Dec 2021 09:07:35 +0000 (09:07 +0000)
Sometimes, peripheral_uart_read() returns -EAGAIN.
If you retry it many times, it returns correct value.

Change-Id: I2a7f9aacc7d0ca47ca06cca52382c0185c76f4fb

src/peripheral_uart.c

index 8453095..2e86a28 100644 (file)
@@ -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);