From 8bf4684de80403593f9a3986522771cc74e08952 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 19 Jul 2016 09:53:52 -0600 Subject: [PATCH] Update some comments --- drivers/serial/pty.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/serial/pty.c b/drivers/serial/pty.c index 74f278145a..dcfae95cc8 100644 --- a/drivers/serial/pty.c +++ b/drivers/serial/pty.c @@ -471,10 +471,18 @@ static ssize_t pty_read(FAR struct file *filep, FAR char *buffer, size_t len) sched_unlock(); } else +#else + /* If we wanted to return full blocks of data, then file_read() + * may need to be called repeatedly. That is because the pipe + * read() method will return early if the fifo becomes empty + * after any data has been read. + */ + +# error Missing logic #endif { - /* Read one byte from the source the byte. This call will block - * if the source pipe is empty. + /* Read one byte from the source the byte. This call will + * block if the source pipe is empty. */ nread = file_read(&dev->pd_src, &ch, 1);