From 36743b30f2be0d51e188d7cd59e7c4d02622f811 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20K=C4=99pie=C5=84?= Date: Fri, 14 Nov 2025 15:01:47 +0100 Subject: [PATCH] Support TCSETSW2 and TCSETSF2 --- src/record_syscall.cc | 2 ++ src/test/ioctl_tty.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/record_syscall.cc b/src/record_syscall.cc index a198d339a8e..bfa4b6f67a8 100644 --- a/src/record_syscall.cc +++ b/src/record_syscall.cc @@ -1984,6 +1984,8 @@ static Switchable prepare_ioctl(RecordTask* t, case IOCTL_MASK_SIZE(TUNSETVNETLE): case IOCTL_MASK_SIZE(TUNSETVNETBE): case IOCTL_MASK_SIZE(TCSETS2): + case IOCTL_MASK_SIZE(TCSETSW2): + case IOCTL_MASK_SIZE(TCSETSF2): return PREVENT_SWITCH; case IOCTL_MASK_SIZE(USBDEVFS_GETDRIVER): // Reads and writes its parameter despite not having the _IOC_READ bit. diff --git a/src/test/ioctl_tty.c b/src/test/ioctl_tty.c index ade21bfab07..b834718adb9 100644 --- a/src/test/ioctl_tty.c +++ b/src/test/ioctl_tty.c @@ -132,6 +132,8 @@ int main(void) { tc2->c_iflag, tc2->c_oflag, tc2->c_cflag, tc2->c_lflag, tc2->c_ispeed, tc2->c_ospeed); test_assert(0 == ioctl(fd, TCSETS2, tc2)); + test_assert(0 == ioctl(fd, TCSETSW2, tc2)); + test_assert(0 == ioctl(fd, TCSETSF2, tc2)); // NB: leaving the TCSETS2 as the last word seems to mess up the terminal, // so fix it.