From 2dcaab8af848dd1fec62bda44813dd6b8bc725af Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Wed, 9 Feb 2022 02:24:38 +0800 Subject: [PATCH] serial/pty: Remove the unused code related to CONFIG_PSEUDOTERM_FULLBLOCKS Signed-off-by: Xiang Xiao --- drivers/serial/pty.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/drivers/serial/pty.c b/drivers/serial/pty.c index 7fcbc9d7c61..e8b5a2207b7 100644 --- a/drivers/serial/pty.c +++ b/drivers/serial/pty.c @@ -91,10 +91,6 @@ * Pre-processor Definitions ****************************************************************************/ -/* Should never be set... only for comparison to serial.c */ - -#undef CONFIG_PSEUDOTERM_FULLBLOCKS - /* Maximum number of threads than can be waiting for POLL events */ #ifndef CONFIG_DEV_PTY_NPOLLWAITERS @@ -488,7 +484,6 @@ static ssize_t pty_read(FAR struct file *filep, FAR char *buffer, size_t len) ntotal = 0; for (i = 0; i < len; i++) { -#ifndef CONFIG_PSEUDOTERM_FULLBLOCKS /* This logic should return if the pipe becomes empty after some * bytes were read from the pipe. If we have already read some * data, we use the FIONREAD ioctl to test if there are more bytes @@ -548,15 +543,6 @@ 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.