From e199d937e2594c56f8ceec9bcfb7f3d8947bc24e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20S=C3=B6ntgen?= Date: Mon, 26 Aug 2024 17:20:04 +0200 Subject: [PATCH] libc/termios: satisfy vbox6 serial-port This commit adds support for TIOCSETA and TIOCFLUSH in a dummy fashion that is enough to allow vbox6's serial-port implementation to print lines to the log. Issue #5330. --- repos/libports/src/lib/libc/vfs_plugin.cc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/repos/libports/src/lib/libc/vfs_plugin.cc b/repos/libports/src/lib/libc/vfs_plugin.cc index d12acda2ef..bdd5d58839 100644 --- a/repos/libports/src/lib/libc/vfs_plugin.cc +++ b/repos/libports/src/lib/libc/vfs_plugin.cc @@ -1127,6 +1127,19 @@ Libc::Vfs_plugin::_ioctl_tio(File_descriptor *fd, unsigned long request, char *a termios->c_ispeed = 0; termios->c_ospeed = 0; + handled = true; + + } else if (request == TIOCSETA) { + + /* + * As TIOCGETA above only returns the for now required + * options ignore any attempt to set them. + */ + + handled = true; + + } else if (request == TIOCFLUSH) { + handled = true; } @@ -1921,7 +1934,9 @@ int Libc::Vfs_plugin::ioctl(File_descriptor *fd, unsigned long request, char *ar switch (request) { case TIOCGWINSZ: + case TIOCFLUSH: case TIOCGETA: + case TIOCSETA: result = _ioctl_tio(fd, request, argp); break; case DIOCGMEDIASIZE: