agetty: Switch to 8-bit processing in get_logname() for UTF-8 terminals

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>
Tested-by: Lubomir Rintel <lkundrak@v3.sk>
This commit is contained in:
Stanislav Brabec 2019-02-27 23:22:40 +01:00 committed by Karel Zak
parent b72c23f220
commit bed1af44f4
1 changed files with 1 additions and 1 deletions

View File

@ -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';