dd: fix issues in the count_bytes and seek_bytes flags change
authorPádraig Brady <P@draigBrady.com>
Mon, 13 Feb 2012 21:47:28 +0000 (21:47 +0000)
committerPádraig Brady <P@draigBrady.com>
Mon, 13 Feb 2012 21:58:21 +0000 (21:58 +0000)
commit4bb5dbcfef55c4f66755dd3c48b906e4e9030b96
tree319a68a46ddbe044f5851891f1826174e5f88360
parent140eca15c4a3d3213629a048cc307fde0d094738
dd: fix issues in the count_bytes and seek_bytes flags change

These edge cases were missed in the previous commit 140eca15c.

* src/dd.c (main): Include the bytes slop when truncating
without further I/O.  Don't invalidate the whole file cache
in the case where 0 < count < ibs.
* tests/dd/bytes: Change to using the independent truncate
command to generate the file for comparison.  Remove a redundant
test case and replace with one testing the truncation only logic.
src/dd.c
tests/dd/bytes