From: Karel Zak <kzak@redhat.com>
To: Lubomir Rintel <lkundrak@v3.sk>
Cc: util-linux@vger.kernel.org
Subject: Re: [PATCH] agetty: don't put the VC into canonical mode
Date: Tue, 25 Sep 2018 13:22:23 +0200 [thread overview]
Message-ID: <20180925112223.jbxhydzmjsdovdsv@ws.net.home> (raw)
In-Reply-To: <20180924101535.511758-1-lkundrak@v3.sk>
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@redhat.com>
http://karelzak.blogspot.com
next prev parent reply other threads:[~2018-09-25 17: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 [this message]
2018-10-16 6:29 ` Lubomir Rintel
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=20180925112223.jbxhydzmjsdovdsv@ws.net.home \
--to=kzak@redhat.com \
--cc=lkundrak@v3.sk \
--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).