Sometimes, peripheral_uart_read() returns -EAGAIN.
If you retry it many times, it returns correct value.
Change-Id: I2a7f9aacc7d0ca47ca06cca52382c0185c76f4fb
(cherry picked from commit
1fd0a40d9d0978fdfa8dae6e221c08b650a5224b)
};
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);