Initialize serialdump termios properly

termios i_flags were not initialized and could be set to arbitrary values
this resulted in unpredicted behaviour of the output like additional
newlines
This commit is contained in:
Yannic Schröder 2016-09-20 14:14:14 +02:00
parent 3f4436bac9
commit 2974b796d1

View File

@ -208,6 +208,8 @@ main(int argc, char **argv)
options.c_cflag |= CS8; options.c_cflag |= CS8;
/* Raw input */ /* Raw input */
options.c_iflag &= ~(IGNBRK | BRKINT | PARMRK | ISTRIP
| INLCR | IGNCR | ICRNL | IXON);
options.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG); options.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG);
/* Raw output */ /* Raw output */
options.c_oflag &= ~OPOST; options.c_oflag &= ~OPOST;