diff options
author | Stanislav Brabec | 2019-02-27 23:22:40 +0100 |
---|---|---|
committer | Karel Zak | 2019-03-04 11:38:28 +0100 |
commit | dcf03ffb379227678d4035df2c48f6604b9f663a (patch) | |
tree | 9a5492dc52de74a56f71608cdbbeb8567a47f075 /term-utils | |
parent | agetty: Fix input of non-ASCII characters in get_logname() (diff) | |
download | kernel-qcow2-util-linux-dcf03ffb379227678d4035df2c48f6604b9f663a.tar.gz kernel-qcow2-util-linux-dcf03ffb379227678d4035df2c48f6604b9f663a.tar.xz kernel-qcow2-util-linux-dcf03ffb379227678d4035df2c48f6604b9f663a.zip |
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>
Diffstat (limited to 'term-utils')
-rw-r--r-- | term-utils/agetty.c | 2 |
1 files changed, 1 insertions, 1 deletions
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'; |