From owner-svn-src-head@freebsd.org Sat Apr 15 14:28:33 2017 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 7F3AAD3F0DD; Sat, 15 Apr 2017 14:28:33 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5CDC17C; Sat, 15 Apr 2017 14:28:32 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id E267D10A7B9; Sat, 15 Apr 2017 10:28:30 -0400 (EDT) From: John Baldwin To: "Ngie Cooper (yaneurabeya)" , src-committers Cc: rgrimes@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r316938 - head/sbin/savecore Date: Sat, 15 Apr 2017 07:26:41 -0700 Message-ID: <1774031.vuxxQt1GW8@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <4CBF25DF-F407-4F50-8724-B73F64734E19@gmail.com> References: <201704150149.v3F1nu0D009274@pdx.rh.CN85.dnsmgr.net> <4CBF25DF-F407-4F50-8724-B73F64734E19@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Sat, 15 Apr 2017 10:28:31 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean 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: Sat, 15 Apr 2017 14:28:33 -0000 On Friday, April 14, 2017 07:40:57 PM Ngie Cooper wrote: > > > On Apr 14, 2017, at 18:49, Rodney W. Grimes wrote: > > Do we use KiB, MiB, GiB,... any place else in the system? I cant think of > > a place we do this, so please, lets not start doing this here? The du manpage does at least. > humanize_number(3) from libutil uses IEC units. Note that it is optional though. You can use flags to decide what you want and the default is to not use IEC. ls -h uses humanize_number but not with IEC units. In particular, there are flags to control the scaling and prefixes used: HN_DIVISOR_1000 and HN_IEC_PREFIXES. The default is to use power-of-2 scaling with non-IEC prefixes (so KB == 1024 by default). Currently nothing in base uses HN_IEC_PREFIXES. (I see you already reverted the printf, just wanted to point out that the humanize_number behavior is configurable.) -- John Baldwin