static void
diff_dumpdir (void)
{
- char *dumpdir_buffer;
+ const 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);
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);
"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;
+ 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 (¤t_stat_info);
}