You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by pk...@apache.org on 2022/02/20 20:22:31 UTC

[incubator-nuttx] branch master updated: serial/pty: Remove the unused code related to CONFIG_PSEUDOTERM_FULLBLOCKS

This is an automated email from the ASF dual-hosted git repository.

pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 2dcaab8  serial/pty: Remove the unused code related to CONFIG_PSEUDOTERM_FULLBLOCKS
2dcaab8 is described below

commit 2dcaab8af848dd1fec62bda44813dd6b8bc725af
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Wed Feb 9 02:24:38 2022 +0800

    serial/pty: Remove the unused code related to CONFIG_PSEUDOTERM_FULLBLOCKS
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 drivers/serial/pty.c | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/drivers/serial/pty.c b/drivers/serial/pty.c
index 7fcbc9d..e8b5a22 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.