From ea0a6b417ac906ddafc1c9e26c790ec44c7eafea Mon Sep 17 00:00:00 2001 From: marcel Date: Sat, 28 Jun 2003 19:32:07 +0000 Subject: Don't map LINUX_POSIX_VDISABLE to _POSIX_VDISABLE and vice versa for the VMIN and VTIME members of the c_cc array. These members are not special control characters. By not excluding these members we changed the noncanonical mode input processing when both members were 0 on entry (=LINUX_POSIX_VDISABLE) as we would remap them to 255 (=_POSIX_VDISABLE). See termios(4) case A for how that screws up your terminal I/O. PR: 23173 Originator: Bjarne Blichfeldt Patch by: Boris Nikolaus (original submission) Philipp Mergenthaler Reminders by: Joseph Holland King MFC after: 5 days --- sys/compat/linux/linux_ioctl.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sys/compat/linux/linux_ioctl.c') diff --git a/sys/compat/linux/linux_ioctl.c b/sys/compat/linux/linux_ioctl.c index d99e05f..5c7c711 100644 --- a/sys/compat/linux/linux_ioctl.c +++ b/sys/compat/linux/linux_ioctl.c @@ -346,7 +346,8 @@ bsd_to_linux_termios(struct termios *bios, struct linux_termios *lios) lios->c_cc[LINUX_VLNEXT] = bios->c_cc[VLNEXT]; for (i=0; ic_cc[i] == _POSIX_VDISABLE) + if (i != LINUX_VMIN && i != LINUX_VTIME && + lios->c_cc[i] == _POSIX_VDISABLE) lios->c_cc[i] = LINUX_POSIX_VDISABLE; } lios->c_line = 0; @@ -485,7 +486,8 @@ linux_to_bsd_termios(struct linux_termios *lios, struct termios *bios) bios->c_cc[VLNEXT] = lios->c_cc[LINUX_VLNEXT]; for (i=0; ic_cc[i] == LINUX_POSIX_VDISABLE) + if (i != VMIN && i != VTIME && + bios->c_cc[i] == LINUX_POSIX_VDISABLE) bios->c_cc[i] = _POSIX_VDISABLE; } -- cgit v1.1