On Tue, 2018-09-25 at 13:22 +0200, Karel Zak wrote: > 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. Of course, you're right -- the conditional is reversed. I'll follow up with a v2. > > > - /* 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 ? I honestly have no idea. By switching to the vconsole to non-canonical mode as well, I just stopped getting a newline after typing a login: xo login: lkundrakPassword: I just thought it was sort of expected to get the same behavior as on serial lines and removed the special case. > 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); Yes (but with the write_all(\r\n) common for both serial and vc). > > > Karel Thanks, Lubo