From 2974b796d1c2a65fe4927d1307f949ddb78184a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yannic=20Schr=C3=B6der?= Date: Tue, 20 Sep 2016 14:14:14 +0200 Subject: [PATCH] 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 --- tools/sky/serialdump.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/sky/serialdump.c b/tools/sky/serialdump.c index 12fd0abfc..deab56df4 100644 --- a/tools/sky/serialdump.c +++ b/tools/sky/serialdump.c @@ -208,6 +208,8 @@ main(int argc, char **argv) options.c_cflag |= CS8; /* Raw input */ + options.c_iflag &= ~(IGNBRK | BRKINT | PARMRK | ISTRIP + | INLCR | IGNCR | ICRNL | IXON); options.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG); /* Raw output */ options.c_oflag &= ~OPOST;