From owner-svn-src-all@freebsd.org Tue May 17 21:23:14 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 84D5EB3F67C; Tue, 17 May 2016 21:23:14 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 577991122; Tue, 17 May 2016 21:23:14 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u4HLND7I092912; Tue, 17 May 2016 21:23:13 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4HLND4w092911; Tue, 17 May 2016 21:23:13 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201605172123.u4HLND4w092911@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 17 May 2016 21:23:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r300078 - head/lib/libstand X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 May 2016 21:23:14 -0000 Author: imp Date: Tue May 17 21:23:13 2016 New Revision: 300078 URL: https://svnweb.freebsd.org/changeset/base/300078 Log: Add support for %S to libstand as well so /boot/loader and friends can use it. Modified: head/lib/libstand/printf.c Modified: head/lib/libstand/printf.c ============================================================================== --- head/lib/libstand/printf.c Tue May 17 20:53:56 2016 (r300077) +++ head/lib/libstand/printf.c Tue May 17 21:23:13 2016 (r300078) @@ -204,6 +204,7 @@ kvprintf(char const *fmt, kvprintf_fn_t char nbuf[MAXNBUF]; char *d; const char *p, *percent, *q; + uint16_t *S; u_char *up; int ch, n; uintmax_t num; @@ -398,6 +399,10 @@ reswitch: switch (ch = (u_char)*fmt++) { while (width--) PCHAR(padc); break; + case 'S': /* Assume console can cope with wide chars */ + for (S = va_arg(ap, uint16_t *); *S != 0; S++) + PCHAR(*S); + break; case 't': tflag = 1; goto reswitch;