Re: [PATCH 2/2] agetty: Switch to 8-bit processing in get_logname() for UTF-8 terminals

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2019-02-27 at 23:22 +0100, Stanislav Brabec wrote:
> If the terminal is in the UTF-8 mode, get_logname() should use 8-bit
> processing.
> 
> Signed-off-by: Stanislav Brabec <sbrabec@xxxxxxx>
> Cc: Lubomir Rintel <lkundrak@xxxxx>

Tested-by: Lubomir Rintel <lkundrak@xxxxx>

(both patches)

Thanks
Lubo

> ---
>  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
> 




[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux