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.
This commit is contained in:
Josef Söntgen 2024-08-26 17:20:04 +02:00 committed by Christian Helmuth
parent 2e584f2f86
commit e199d937e2

View File

@ -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: