diff options
author | marcel <marcel@FreeBSD.org> | 2003-06-28 19:32:07 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2003-06-28 19:32:07 +0000 |
commit | ea0a6b417ac906ddafc1c9e26c790ec44c7eafea (patch) | |
tree | 9ccf05d6d16ea5de5ae7d5892ba2f9ac8ab1d390 /sys | |
parent | 1dfc9d7d371ba24b6295fb32465b18dacef22071 (diff) | |
download | FreeBSD-src-ea0a6b417ac906ddafc1c9e26c790ec44c7eafea.zip FreeBSD-src-ea0a6b417ac906ddafc1c9e26c790ec44c7eafea.tar.gz |
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 <bbl@dk.damgaard.com>
Patch by: Boris Nikolaus <bn@dali.tellique.de> (original submission)
Philipp Mergenthaler <philipp.mergenthaler@stud.uni-karlsruhe.de>
Reminders by: Joseph Holland King <gte743n@cad.gatech.edu>
MFC after: 5 days
Diffstat (limited to 'sys')
-rw-r--r-- | sys/compat/linux/linux_ioctl.c | 6 |
1 files changed, 4 insertions, 2 deletions
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; i<LINUX_NCCS; i++) { - if (lios->c_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; i<NCCS; i++) { - if (bios->c_cc[i] == LINUX_POSIX_VDISABLE) + if (i != VMIN && i != VTIME && + bios->c_cc[i] == LINUX_POSIX_VDISABLE) bios->c_cc[i] = _POSIX_VDISABLE; } |