From owner-dev-commits-src-all@freebsd.org Mon Sep 27 05:13:19 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BA16E6AEB30; Mon, 27 Sep 2021 05:13:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HHrPq35tWz3tRt; Mon, 27 Sep 2021 05:13:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4A5512DFC; Mon, 27 Sep 2021 05:13:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 18R5DJWP074844; Mon, 27 Sep 2021 05:13:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 18R5DJKV074843; Mon, 27 Sep 2021 05:13:19 GMT (envelope-from git) Date: Mon, 27 Sep 2021 05:13:19 GMT Message-Id: <202109270513.18R5DJKV074843@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Piotr Pawel Stefaniak Subject: git: 260f26f035af - main - mount: make libxo support more locale-aware MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pstef X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 260f26f035af2095a1b55c04439f479c49e4056c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Sep 2021 05:13:19 -0000 The branch main has been updated by pstef: URL: https://cgit.FreeBSD.org/src/commit/?id=260f26f035af2095a1b55c04439f479c49e4056c commit 260f26f035af2095a1b55c04439f479c49e4056c Author: Piotr Pawel Stefaniak AuthorDate: 2021-09-26 20:50:28 +0000 Commit: Piotr Pawel Stefaniak CommitDate: 2021-09-27 05:12:26 +0000 mount: make libxo support more locale-aware "special", "node", and "mounter" are not guaranteed to be encoded with UTF-8. Use the appropriate modifier. Reported by: eugen@ --- sbin/mount/mount.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sbin/mount/mount.c b/sbin/mount/mount.c index 80eda100c66f..9550ecd1c54e 100644 --- a/sbin/mount/mount.c +++ b/sbin/mount/mount.c @@ -671,7 +671,7 @@ prmount(struct statfs *sfp) struct passwd *pw; char *fsidbuf; - xo_emit("{:special}{L: on }{:node}{L: (}{:fstype}", sfp->f_mntfromname, + xo_emit("{:special/%hs}{L: on }{:node/%hs}{L: (}{:fstype}", sfp->f_mntfromname, sfp->f_mntonname, sfp->f_fstypename); flags = sfp->f_flags & MNT_VISFLAGMASK; @@ -687,9 +687,9 @@ prmount(struct statfs *sfp) if ((flags & MNT_USER) != 0 || sfp->f_owner != 0) { xo_emit("{D:, }{L:mounted by }"); if ((pw = getpwuid(sfp->f_owner)) != NULL) - xo_emit("{:mounter}", pw->pw_name); + xo_emit("{:mounter/%hs}", pw->pw_name); else - xo_emit("{:mounter}", sfp->f_owner); + xo_emit("{:mounter/%hs}", sfp->f_owner); } if (verbose) { if (sfp->f_syncwrites != 0 || sfp->f_asyncwrites != 0) {