From: Lubomir Rintel <lkundrak@v3.sk>
To: Karel Zak <kzak@redhat.com>
Cc: util-linux@vger.kernel.org
Subject: Re: [PATCH] agetty: don't put the VC into canonical mode
Date: Tue, 16 Oct 2018 08:29:37 +0200 [thread overview]
Message-ID: <fc48ac33ea6a2babeb4a322af4881b8fa8761bba.camel@v3.sk> (raw)
In-Reply-To: <20180925112223.jbxhydzmjsdovdsv@ws.net.home>
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
prev parent reply other threads:[~2018-10-16 6:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-24 10:15 [PATCH] agetty: don't put the VC into canonical mode Lubomir Rintel
2018-09-25 11:22 ` Karel Zak
2018-10-16 6:29 ` Lubomir Rintel [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fc48ac33ea6a2babeb4a322af4881b8fa8761bba.camel@v3.sk \
--to=lkundrak@v3.sk \
--cc=kzak@redhat.com \
--cc=util-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).