slcanpty: fix pty terminal flags for correct NL/CR handling

Signed-off-by: Janusz Uzycki <j.uzycki@elproma.com.pl>
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
pull/1/head
Oliver Hartkopp 2013-06-11 22:11:19 +02:00
parent c9422deb0b
commit d469336649
1 changed files with 3 additions and 1 deletions

View File

@ -430,7 +430,9 @@ int main(int argc, char **argv)
/* disable local echo which would cause double frames */
topts.c_lflag &= ~(ICANON | ECHO | ECHOE | ECHOK |
ECHONL | ECHOPRT | ECHOKE | ICRNL);
ECHONL | ECHOPRT | ECHOKE);
topts.c_iflag &= ~(ICRNL);
topts.c_iflag |= INLCR;
tcsetattr(p, TCSANOW, &topts);
/* Support for the Unix 98 pseudo-terminal interface /dev/ptmx /dev/pts/N */