On Mon, Sep 24, 2018 at 12:15:35PM +0200, Lubomir Rintel wrote: > - if ((options.flags & F_VCONSOLE) == 0) { > - /* Finalize the termios settings. */ > + /* Finalize the termios settings. */ > + if ((options.flags & F_VCONSOLE) == 0) > + reset_vc(&options, &termios, 1); > + else > termio_final(&options, &termios, &chardata); This completely changes logic of the code and removes termio_final() from serial-line code path. Is it expected change? I don't think so. > - /* Now the newline character should be properly written. */ > - write_all(STDOUT_FILENO, "\r\n", 2); > - } > + /* Now the newline character should be properly written. */ > + write_all(STDOUT_FILENO, "\r\n", 2); Why we need to always write \r\n ? Maybe all you need is if ((options.flags & F_VCONSOLE) == 0) { termio_final(&options, &termios, &chardata); write_all(STDOUT_FILENO, "\r\n", 2); } else reset_vc(&options, &termios, 1); Karel -- Karel Zak <kzak@xxxxxxxxxx> http://karelzak.blogspot.com