svn commit: r316938 - head/sbin/savecore
John Baldwin
jhb at freebsd.org
Sat Apr 15 14:28:33 UTC 2017
On Friday, April 14, 2017 07:40:57 PM Ngie Cooper wrote:
>
> > On Apr 14, 2017, at 18:49, Rodney W. Grimes <freebsd at pdx.rh.CN85.dnsmgr.net> 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
More information about the svn-src-all
mailing list