HomeFreeBSD

dd(1): Correct padding in status=progress

Description

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

Details

Provenance
kevansAuthored on
Reviewer
imp
Differential Revision
D16960: dd: Correct padding in status=progress
Parents
rS338645: amd64: implement ERMS-based memmove, memcpy and memset
Branches
Unknown
Tags
Unknown