Add iflag=fullblock to dd
authorMatt Macy <mmacy@FreeBSD.org>
Mon, 30 Sep 2019 22:00:48 +0000 (22:00 +0000)
committerMatt Macy <mmacy@FreeBSD.org>
Mon, 30 Sep 2019 22:00:48 +0000 (22:00 +0000)
commitb52c534bffcc40e5be49f6d012c9d4005f0bbd81
tree48fe378c50706301933447378a6f14c238c855c6
parent919156e34c859f4690eff7af344c76cfbe6e8a64
Add iflag=fullblock to dd

Normally, count=n means read(2) will be called n times on the input to dd. If
the read() returns short, as may happen when reading from a pipe, fewer bytes
will be copied from the input. With conv=sync the buffer is padded with zeros
to fill the rest of the block.

iflag=fullblock causes dd to continue reading until the block is full, so that
count=n means n full blocks are copied. This flag is compatible with illumos
and GNU dd and is used in the ZFS test suite.

Submitted by: Ryan Moeller
Reviewed by: manpages, mmacy@
MFC after: 1 week
Sponsored by:  iXsystems, Inc.
Differential Revision: https://reviews.freebsd.org/D21441
bin/dd/args.c
bin/dd/dd.1
bin/dd/dd.c
bin/dd/dd.h