]> git.ipfire.org Git - thirdparty/coreutils.git/commit
shred: avoid a data pass on empty files
authorPádraig Brady <P@draigBrady.com>
Thu, 3 Apr 2014 12:47:48 +0000 (13:47 +0100)
committerPádraig Brady <P@draigBrady.com>
Fri, 4 Apr 2014 04:32:41 +0000 (05:32 +0100)
commit217618e8bf10a09270291b9825f3181ed2f83dbf
tree2dda4cac20c6f65fee545800279cf5f995ede4fa
parentd0294ff3b90430750a631556277c75f1a555dd44
shred: avoid a data pass on empty files

* src/shred.c (do_wipefd): Don't increase the size written
for an empty file up to a full block.  Also increase the size
to OFF_T_MAX in the edge case where we do overflow.
* NEWS: Mention the shred improvements from recent changes.
* tests/misc/shred-passes.sh: Adjust as we no longer
write a BLKSIZE of data for empty files.
NEWS
src/shred.c
tests/misc/shred-passes.sh