]> git.ipfire.org Git - thirdparty/coreutils.git/commit
numfmt: handle suffixes consistently with --{from,to}-unit
authorPádraig Brady <P@draigBrady.com>
Mon, 15 Jun 2015 02:55:46 +0000 (03:55 +0100)
committerPádraig Brady <P@draigBrady.com>
Fri, 19 Jun 2015 13:50:34 +0000 (14:50 +0100)
commit6fadd46acd5b813b545b58014ddd591ffdb5a41c
tree2b9982ef2fed456428e9a64e9a4270ee88985b00
parenta262318f833c0d929da4bbd1c3002f891fa9bfa1
numfmt: handle suffixes consistently with --{from,to}-unit

* src/numfmt.c (unit_to_umax): Support SI (power of 10) suffixes
with the --from-unit and --to-unit options.  Treat suffixes like
is done with --from=auto, which for example will change the meaning
of --to-unit=G to that of --to-unit=Gi.  The suffix support was
previously undocumented and it's better to avoid the traditional
coreutils suffix handling in numfmt by default.
* doc/coreutils.texi: Document the new behavior.  Also fix a typo
mentioning {from,to}=units=.
* tests/misc/numfmt.pl: Adjust accordingly.
* NEWS: Mention the change in behavior.
NEWS
doc/coreutils.texi
src/numfmt.c
tests/misc/numfmt.pl