diff options
author | Jim Meyering <jim@meyering.net> | 2004-06-04 17:43:55 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2004-06-04 17:43:55 +0000 |
commit | 657842c6939531b731f5f2d787feb1094ff3b999 (patch) | |
tree | c3609acf90e04cad8828cac78936c518850ece22 /src | |
parent | b07edbf476fd37f399b4c5f2936202db5ba655f3 (diff) | |
download | coreutils-657842c6939531b731f5f2d787feb1094ff3b999.tar.xz |
(dopass): Don't subtract 1 from the offset after
a write error. Problem reported by Jon Peatfield in:
http://lists.gnu.org/archive/html/bug-coreutils/2004-06/msg00020.html
Diffstat (limited to 'src')
-rw-r--r-- | src/shred.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/shred.c b/src/shred.c index 641cef8ee..0d66c1cd2 100644 --- a/src/shred.c +++ b/src/shred.c @@ -921,7 +921,8 @@ dopass (int fd, char const *qname, off_t *sizep, int type, if (lseek (fd, (off_t) (offset + soff + 512), SEEK_SET) != -1) { - soff += 512; + /* Arrange to skip this block. */ + ssize = 512; write_error = true; continue; } |