|
@@ -205,46 +205,21 @@ read_and (void (*do_something) (void))
|
|
void
|
|
void
|
|
list_archive (void)
|
|
list_archive (void)
|
|
{
|
|
{
|
|
|
|
+ off_t block_ordinal = current_block_ordinal ();
|
|
/* Print the header block. */
|
|
/* Print the header block. */
|
|
|
|
|
|
decode_header (current_header, ¤t_stat_info, ¤t_format, 0);
|
|
decode_header (current_header, ¤t_stat_info, ¤t_format, 0);
|
|
if (verbose_option)
|
|
if (verbose_option)
|
|
- print_header (¤t_stat_info, -1);
|
|
|
|
|
|
+ print_header (¤t_stat_info, block_ordinal);
|
|
|
|
|
|
- if (incremental_option && current_header->header.typeflag == GNUTYPE_DUMPDIR)
|
|
|
|
|
|
+ if (incremental_option)
|
|
{
|
|
{
|
|
- off_t size;
|
|
|
|
- size_t written, check;
|
|
|
|
- union block *data_block;
|
|
|
|
-
|
|
|
|
- set_next_block_after (current_header);
|
|
|
|
- if (multi_volume_option)
|
|
|
|
|
|
+ if (verbose_option > 2)
|
|
{
|
|
{
|
|
- assign_string (&save_name, current_stat_info.orig_file_name);
|
|
|
|
- save_totsize = current_stat_info.stat.st_size;
|
|
|
|
- }
|
|
|
|
- for (size = current_stat_info.stat.st_size; size > 0; size -= written)
|
|
|
|
- {
|
|
|
|
- if (multi_volume_option)
|
|
|
|
- save_sizeleft = size;
|
|
|
|
- data_block = find_next_block ();
|
|
|
|
- if (!data_block)
|
|
|
|
- {
|
|
|
|
- ERROR ((0, 0, _("Unexpected EOF in archive")));
|
|
|
|
- break; /* FIXME: What happens, then? */
|
|
|
|
- }
|
|
|
|
- written = available_space_after (data_block);
|
|
|
|
- if (written > size)
|
|
|
|
- written = size;
|
|
|
|
- set_next_block_after ((union block *)
|
|
|
|
- (data_block->buffer + written - 1));
|
|
|
|
- if (verbose_option > 2)
|
|
|
|
- list_dumpdir (data_block->buffer, written);
|
|
|
|
|
|
+ if (current_stat_info.dumpdir)
|
|
|
|
+ list_dumpdir (current_stat_info.dumpdir,
|
|
|
|
+ dumpdir_size (current_stat_info.dumpdir));
|
|
}
|
|
}
|
|
- if (multi_volume_option)
|
|
|
|
- assign_string (&save_name, 0);
|
|
|
|
-
|
|
|
|
- return;
|
|
|
|
}
|
|
}
|
|
|
|
|
|
if (multi_volume_option)
|
|
if (multi_volume_option)
|
|
@@ -601,7 +576,13 @@ decode_header (union block *header, struct tar_stat_info *stat_info,
|
|
stat_info->is_sparse = true;
|
|
stat_info->is_sparse = true;
|
|
}
|
|
}
|
|
else
|
|
else
|
|
- stat_info->is_sparse = false;
|
|
|
|
|
|
+ {
|
|
|
|
+ stat_info->is_sparse = false;
|
|
|
|
+ if ((current_format == GNU_FORMAT
|
|
|
|
+ || current_format == OLDGNU_FORMAT)
|
|
|
|
+ && current_header->header.typeflag == GNUTYPE_DUMPDIR)
|
|
|
|
+ get_gnu_dumpdir ();
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
/* Convert buffer at WHERE0 of size DIGS from external format to
|
|
/* Convert buffer at WHERE0 of size DIGS from external format to
|