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
This commit is contained in:
parent
c76b41b7b5
commit
19acf030a2
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user