Util-Linux Archive on lore.kernel.org
 help / color / Atom feed
From: Lubomir Rintel <lkundrak@v3.sk>
To: Stanislav Brabec <sbrabec@suse.cz>, util-linux@vger.kernel.org
Subject: Re: [PATCH 2/2] agetty: Switch to 8-bit processing in get_logname() for UTF-8 terminals
Date: Fri, 01 Mar 2019 09:04:54 +0100
Message-ID: <fc355e625d959e42309f689d1f1716122deb55b1.camel@v3.sk> (raw)
In-Reply-To: <938cb4db-f24a-4498-27f7-8b6f7180c2a2@suse.cz>

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@suse.cz>
> Cc: Lubomir Rintel <lkundrak@v3.sk>

Tested-by: Lubomir Rintel <lkundrak@v3.sk>

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


  reply index

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-27 22:22 Stanislav Brabec
2019-03-01  8:04 ` Lubomir Rintel [this message]
2019-03-04 10:40   ` Karel Zak

Reply instructions:

You may reply publically 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=fc355e625d959e42309f689d1f1716122deb55b1.camel@v3.sk \
    --to=lkundrak@v3.sk \
    --cc=sbrabec@suse.cz \
    --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

Util-Linux Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/util-linux/0 util-linux/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 util-linux util-linux/ https://lore.kernel.org/util-linux \
		util-linux@vger.kernel.org util-linux@archiver.kernel.org
	public-inbox-index util-linux


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.util-linux


AGPL code for this site: git clone https://public-inbox.org/ public-inbox