mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-25 01:02:24 +00:00
Disable a bunch of undesirable termios flags. ICRNL, in particular,
is liable to have been set on serial ports previously used as terminal devices, and definitely wants not to be set on serial ports being used for callout. [originally from svn r6865]
This commit is contained in:
parent
1ee1d694cf
commit
e9ce146b9f
11
unix/uxser.c
11
unix/uxser.c
@ -205,7 +205,16 @@ static const char *serial_configure(Serial serial, Config *cfg)
|
||||
|
||||
options.c_cflag |= CLOCAL | CREAD;
|
||||
options.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG);
|
||||
options.c_oflag &= ~OPOST;
|
||||
options.c_iflag &= ~(ISTRIP | IGNCR | INLCR | ICRNL
|
||||
#ifdef IUCLC
|
||||
| IUCLC
|
||||
#endif
|
||||
);
|
||||
options.c_oflag &= ~(OPOST
|
||||
#ifdef ONLCR
|
||||
| ONLCR
|
||||
#endif
|
||||
| OCRNL | ONOCR | ONLRET);
|
||||
options.c_cc[VMIN] = 1;
|
||||
options.c_cc[VTIME] = 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user