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

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

commit 51623d175126b696423103c370cba976f7b71c44
Author: fangzhenwei <[email protected]>
AuthorDate: Mon Dec 18 20:23:09 2023 +0800

    rpmsgfs: add tty fd ioctl(TCGETS/TCSETS) support
    
    rpmsgfs client ioctl support TCDRN/TCFLSH/TCGETS/TCSETS
    
    Signed-off-by: fangzhenwei <[email protected]>
---
 fs/rpmsgfs/rpmsgfs_client.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/fs/rpmsgfs/rpmsgfs_client.c b/fs/rpmsgfs/rpmsgfs_client.c
index 1b863752cf..024e7d74e5 100644
--- a/fs/rpmsgfs/rpmsgfs_client.c
+++ b/fs/rpmsgfs/rpmsgfs_client.c
@@ -27,6 +27,7 @@
 #include <string.h>
 #include <stdio.h>
 #include <sys/uio.h>
+#include <termios.h>
 #include <fcntl.h>
 
 #include <nuttx/kmalloc.h>
@@ -396,6 +397,12 @@ static ssize_t rpmsgfs_ioctl_arglen(int cmd)
         return sizeof(int);
       case FIOC_FILEPATH:
         return PATH_MAX;
+      case TCDRN:
+      case TCFLSH:
+        return 0;
+      case TCGETS:
+      case TCSETS:
+        return sizeof(struct termios);
       case FIOC_SETLK:
       case FIOC_GETLK:
       case FIOC_SETLKW:

Reply via email to