Date: Thu, 24 Mar 2011 14:12:42 +0000 (UTC) From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r219959 - head/cddl/contrib/opensolaris/lib/libzfs/common Message-ID: <201103241412.p2OECgux035297@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pjd Date: Thu Mar 24 14:12:41 2011 New Revision: 219959 URL: http://svn.freebsd.org/changeset/base/219959 Log: Properly print characters larger than 127. Submitted by: noordsij <noordsij@cs.helsinki.fi> Reviewed by: Eric Schrock <eric.schrock@delphix.com> MFC after: 1 month Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c Thu Mar 24 13:52:59 2011 (r219958) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c Thu Mar 24 14:12:41 2011 (r219959) @@ -138,8 +138,10 @@ stream_bytes(FILE *fp, const char *strin while (*string) { if (*string > ' ' && *string != '\\' && *string < '\177') (void) fprintf(fp, "%c", *string++); - else - (void) fprintf(fp, "\\%03o", *string++); + else { + (void) fprintf(fp, "\\%03hho", + (unsigned char)*string++); + } } }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201103241412.p2OECgux035297>