init: fix termios settings for character size
authorAlan Cox <alan@linux.intel.com>
Sat, 6 Oct 2018 17:07:14 +0000 (18:07 +0100)
committerAlan Cox <alan@linux.intel.com>
Sat, 6 Oct 2018 17:07:14 +0000 (18:07 +0100)
The termios code in init forgets to set the character width in bits so defaults
to 5 bit chars. Needless to say now we have implemented character widths in
termios settings in some drivers this does not end well.

Applications/util/init.c

index cf4a552..4c7b148 100644 (file)
@@ -666,7 +666,7 @@ static void envset(const char *a, const char *b)
 static struct termios tref = {
        BRKINT | ICRNL,
        OPOST | ONLCR,
-       CREAD | HUPCL,
+       CS8 | CREAD | HUPCL,
        ISIG | ICANON | ECHO | ECHOE | ECHOK | IEXTEN,
        {CTRL('D'), 0, CTRL('H'), CTRL('C'),
         CTRL('U'), CTRL('\\'), CTRL('Q'), CTRL('S'),