浏览代码

[smart] add FIONREAD ioctl support for tty (#8996)

Signed-off-by: Shell <smokewood@qq.com>
Shell 11 月之前
父节点
当前提交
952f2c43f8
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      components/lwp/terminal/freebsd/tty_compat.c

+ 3 - 3
components/lwp/terminal/freebsd/tty_compat.c

@@ -539,15 +539,15 @@ int lwp_tty_ioctl_adapter(lwp_tty_t tp, int cmd, int oflags, void *args, rt_thre
             args->cmd = TIOCMSET;
             error = (sys_ioctl(td, (struct ioctl_args *)args));
             break;
-
+#endif /* USING_BSD_IOCTL_EXT */
             /* TIOCGSOFTCAR */
             /* TIOCSSOFTCAR */
 
         case FIONREAD: /* TIOCINQ */
-            args->cmd = FIONREAD;
-            error = (sys_ioctl(td, (struct ioctl_args *)args));
+            error = (IOCTL(FIONREAD, args, fflags, td));
             break;
 
+#ifdef USING_BSD_IOCTL_EXT
             /* TIOCLINUX */
 
         case TIOCCONS: