]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/filed/verify.c
Always print Verify hash differences. Rename variable to make the
[bacula/bacula] / bacula / src / filed / verify.c
index 54971ccdd98cddc97bf200708c3c55cf589efc4e..424f178f6207878d324504617d6023698bbfc5dd 100644 (file)
@@ -346,15 +346,16 @@ static int read_digest(BFILE *bfd, DIGEST *digest, JCR *jcr)
    while ((n=bread(bfd, buf, bufsiz)) > 0) {
       /* Check for sparse blocks */
       if (ff_pkt->flags & FO_SPARSE) {
-         bool haveBlock = true;
+         bool allZeros = false;
          if (n == bufsiz &&
              fileAddr+n < (uint64_t)ff_pkt->statp.st_size ||
              ((ff_pkt->type == FT_RAW || ff_pkt->type == FT_FIFO) &&
                (uint64_t)ff_pkt->statp.st_size == 0)) {
-            haveBlock = !is_buf_zero(buf, bufsiz);
+            allZeros = is_buf_zero(buf, bufsiz);
          }
          fileAddr += n;               /* update file address */
-         if (!haveBlock) {
+         /* Skip any block of all zeros */
+         if (allZeros) {
             continue;                 /* skip block of zeros */
          }
       }