]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(dopass): Don't subtract 1 from the offset after
authorJim Meyering <jim@meyering.net>
Fri, 4 Jun 2004 17:43:55 +0000 (17:43 +0000)
committerJim Meyering <jim@meyering.net>
Fri, 4 Jun 2004 17:43:55 +0000 (17:43 +0000)
a write error.  Problem reported by Jon Peatfield in:
http://lists.gnu.org/archive/html/bug-coreutils/2004-06/msg00020.html

src/shred.c

index 641cef8ee6f6f0708fa833e177e62ee0b616ca5d..0d66c1cd29f86c12dc0d83469ef1cc8840ee97df 100644 (file)
@@ -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;
                        }