From: Oliver Hartkopp Date: Tue, 11 Jun 2013 20:11:19 +0000 (+0200) Subject: slcanpty: fix pty terminal flags for correct NL/CR handling X-Git-Tag: 0.1~51 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d469336649a24b1c36bcb3e25e14d29451733d63;p=profile%2Fivi%2Fcan-utils.git slcanpty: fix pty terminal flags for correct NL/CR handling Signed-off-by: Janusz Uzycki Signed-off-by: Oliver Hartkopp --- diff --git a/slcanpty.c b/slcanpty.c index dece1e1..8a11473 100644 --- a/slcanpty.c +++ b/slcanpty.c @@ -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 */