]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
dd(1): Correct padding in status=progress
authorkevans <kevans@FreeBSD.org>
Thu, 13 Sep 2018 14:54:46 +0000 (14:54 +0000)
committerkevans <kevans@FreeBSD.org>
Thu, 13 Sep 2018 14:54:46 +0000 (14:54 +0000)
commit313939fafc93564f473cf6c71143c215f1f72dd5
tree173b7b4fc6403675c989b416bac12b855aeabc80
parentbe73db354f3146c2274fb433ecc4536a53912deb
dd(1): Correct padding in status=progress

Output padding is specified via outlen, which is set using the return value
of fprintf. Because it's printing that padding plus a trailing byte, it
grows by one each iteration rather than reflecting actual length.

Additionally, iec was sized improperly for scaling up similarly to si.
Fixing this revealed that the humanize_number(3) call to populate persec
was using the wrong width.

Submitted by: Thomas Hurst <tom@hur.st>
Reviewed by: imp
Approved by: re (kib)
Differential Revision: https://reviews.freebsd.org/D16960
bin/dd/misc.c