xiaoxiang781216 commented on code in PR #15604:
URL: https://github.com/apache/nuttx/pull/15604#discussion_r1925273465
##########
drivers/serial/serial.c:
##########
@@ -1370,24 +1326,69 @@ static ssize_t uart_readv(FAR struct file *filep, FAR
struct uio *uio)
#endif
nxmutex_unlock(&dev->recv.lock);
- if (recvd >= 0)
+ return recvd;
+}
+
+static ssize_t uart_read(FAR struct file *filep,
+ FAR char *buffer, size_t buflen)
+{
+ return uart_read_internal(filep, buffer, buflen, false);
+}
+
+/****************************************************************************
+ * Name: uart_readv
+ ****************************************************************************/
+
+static ssize_t uart_readv(FAR struct file *filep, FAR struct uio *uio)
+{
+ FAR const struct iovec *iov = uio->uio_iov;
+ int iovcnt = uio->uio_iovcnt;
+ bool nonblock = false;
Review Comment:
need check flags in filep
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]