From: Stanislav Brabec <sbrabec@suse.cz>
To: util-linux@vger.kernel.org
Cc: Lubomir Rintel <lkundrak@v3.sk>
Subject: [PATCH 2/2] agetty: Switch to 8-bit processing in get_logname() for UTF-8 terminals
Date: Wed, 27 Feb 2019 23:22:40 +0100 [thread overview]
Message-ID: <938cb4db-f24a-4498-27f7-8b6f7180c2a2@suse.cz> (raw)
If the terminal is in the UTF-8 mode, get_logname() should use 8-bit
processing.
Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
Cc: Lubomir Rintel <lkundrak@v3.sk>
---
term-utils/agetty.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/term-utils/agetty.c b/term-utils/agetty.c
index 0ef8ba36d..43dbd6dea 100644
--- a/term-utils/agetty.c
+++ b/term-utils/agetty.c
@@ -2059,7 +2059,7 @@ static char *get_logname(struct issue *ie, struct options *op, struct termios *t
sleep(1);
tcflush(STDIN_FILENO, TCIFLUSH);
- eightbit = (op->flags & F_EIGHTBITS);
+ eightbit = (op->flags & (F_EIGHTBITS|F_UTF8));
bp = logname;
*bp = '\0';
--
2.20.1
--
Best Regards / S pozdravem,
Stanislav Brabec
software developer
---------------------------------------------------------------------
SUSE LINUX, s. r. o. e-mail: sbrabec@suse.com
Křižíkova 148/34 (Corso IIa) tel: +420 284 084 060
186 00 Praha 8-Karlín fax: +420 284 084 001
Czech Republic http://www.suse.cz/
PGP: 830B 40D5 9E05 35D8 5E27 6FA3 717C 209F A04F CD76
next reply other threads:[~2019-02-27 22:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-27 22:22 Stanislav Brabec [this message]
2019-03-01 8:04 ` [PATCH 2/2] agetty: Switch to 8-bit processing in get_logname() for UTF-8 terminals Lubomir Rintel
2019-03-04 10:40 ` Karel Zak
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=938cb4db-f24a-4498-27f7-8b6f7180c2a2@suse.cz \
--to=sbrabec@suse.cz \
--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).