]> Dogcows Code - chaz/tar/blobdiff - src/compare.c
(dump_file0): Count links only for actually dumped files
[chaz/tar] / src / compare.c
index 7df3d9853d9dc7ed4b0f15308213e84c8e26ab42..f3723049ed055b3b4ef7d96c5d5c23914b0ab9d8 100644 (file)
@@ -7,7 +7,7 @@
 
    This program is free software; you can redistribute it and/or modify it
    under the terms of the GNU General Public License as published by the
 
    This program is free software; you can redistribute it and/or modify it
    under the terms of the GNU General Public License as published by the
-   Free Software Foundation; either version 2, or (at your option) any later
+   Free Software Foundation; either version 3, or (at your option) any later
    version.
 
    This program is distributed in the hope that it will be useful, but
    version.
 
    This program is distributed in the hope that it will be useful, but
@@ -368,9 +368,9 @@ diff_dumpdir (void)
 {
   char *dumpdir_buffer;
   dev_t dev = 0;
 {
   char *dumpdir_buffer;
   dev_t dev = 0;
-  struct stat stat;
+  struct stat stat_data;
 
 
-  if (deref_stat (true, current_stat_info.file_name, &stat))
+  if (deref_stat (true, current_stat_info.file_name, &stat_data))
     {
       if (errno == ENOENT)
        stat_warn (current_stat_info.file_name);
     {
       if (errno == ENOENT)
        stat_warn (current_stat_info.file_name);
@@ -378,7 +378,7 @@ diff_dumpdir (void)
        stat_error (current_stat_info.file_name);
     }
   else
        stat_error (current_stat_info.file_name);
     }
   else
-    dev = stat.st_dev;
+    dev = stat_data.st_dev;
 
   dumpdir_buffer = get_directory_contents (current_stat_info.file_name, dev);
 
 
   dumpdir_buffer = get_directory_contents (current_stat_info.file_name, dev);
 
@@ -597,9 +597,23 @@ verify_volume (void)
                            "VERIFY FAILURE: %d invalid headers detected",
                            counter), counter));
        }
                            "VERIFY FAILURE: %d invalid headers detected",
                            counter), counter));
        }
-      if (status == HEADER_ZERO_BLOCK || status == HEADER_END_OF_FILE)
+      if (status == HEADER_END_OF_FILE)
        break;
        break;
+      if (status == HEADER_ZERO_BLOCK)
+       {
+         set_next_block_after (current_header);
+          if (!ignore_zeros_option)
+            {
+             char buf[UINTMAX_STRSIZE_BOUND];
 
 
+             status = read_header (false);
+             if (status == HEADER_ZERO_BLOCK)
+               break;
+             WARN ((0, 0, _("A lone zero block at %s"),
+                   STRINGIFY_BIGINT (current_block_ordinal (), buf)));
+            }
+       }
+      
       diff_archive ();
       tar_stat_destroy (&current_stat_info);
     }
       diff_archive ();
       tar_stat_destroy (&current_stat_info);
     }
This page took 0.029064 seconds and 4 git commands to generate.