]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
dd(1): Correct padding in status=progress
authorKyle Evans <kevans@FreeBSD.org>
Thu, 13 Sep 2018 14:54:46 +0000 (14:54 +0000)
committerKyle Evans <kevans@FreeBSD.org>
Thu, 13 Sep 2018 14:54:46 +0000 (14:54 +0000)
commitac5d5b054f0b1b92ae322a4be8122bd9edca84fa
tree173b7b4fc6403675c989b416bac12b855aeabc80
parent13ea074dc3d60682bd7e56a9499e045546ef28da
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