The branch main has been updated by pstef:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=260f26f035af2095a1b55c04439f479c49e4056c

commit 260f26f035af2095a1b55c04439f479c49e4056c
Author:     Piotr Pawel Stefaniak <ps...@freebsd.org>
AuthorDate: 2021-09-26 20:50:28 +0000
Commit:     Piotr Pawel Stefaniak <ps...@freebsd.org>
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) {
_______________________________________________
dev-commits-src-main@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main
To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"

Reply via email to