From owner-svn-src-head@freebsd.org Thu Dec 22 22:30:43 2016 Return-Path: Delivered-To: svn-src-head@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 BC525C8D10B; Thu, 22 Dec 2016 22:30:43 +0000 (UTC) (envelope-from ngie@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 8C09BBC6; Thu, 22 Dec 2016 22:30:43 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBMMUgCX075129; Thu, 22 Dec 2016 22:30:42 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBMMUge9075128; Thu, 22 Dec 2016 22:30:42 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201612222230.uBMMUge9075128@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 22 Dec 2016 22:30:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r310433 - head/lib/libc/stdio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2016 22:30:43 -0000 Author: ngie Date: Thu Dec 22 22:30:42 2016 New Revision: 310433 URL: https://svnweb.freebsd.org/changeset/base/310433 Log: Revert r310138 Adding %b support to vfprintf for parity with kernel space requires more discussion/review. In particular, many parties were concerned over introducing a non-standard format qualifier to *printf(3) which didn't already exist in other OSes, e.g. Linux, thus making code which used %b harder to port to other operating systems. Requested by: many Modified: head/lib/libc/stdio/vfprintf.c Modified: head/lib/libc/stdio/vfprintf.c ============================================================================== --- head/lib/libc/stdio/vfprintf.c Thu Dec 22 21:56:41 2016 (r310432) +++ head/lib/libc/stdio/vfprintf.c Thu Dec 22 22:30:42 2016 (r310433) @@ -611,37 +611,6 @@ reswitch: switch (ch) { case 'z': flags |= SIZET; goto rflag; - case 'b': - { - const char *q; - int anybitset, bit; - - ulval = (u_int)GETARG(int); - cp = GETARG(char *); - - q = __ultoa(ulval, buf + BUF, *cp++, 0, xdigs_lower); - PRINT(q, buf + BUF - q); - - if (ulval == 0) - break; - - for (anybitset = 0; *cp;) { - bit = *cp++; - if (ulval & (1 << (bit - 1))) { - PRINT(anybitset ? "," : "<", 1); - q = cp; - for (; (bit = *cp) > ' '; ++cp) - continue; - PRINT(q, cp - q); - anybitset = 1; - } else - for (; *cp > ' '; ++cp) - continue; - } - if (anybitset) - PRINT(">", 1); - } - continue; case 'C': flags |= LONGINT; /*FALLTHROUGH*/