(read_and): Print block number before

issuing 'Skipping to next header' diagnostics, if
requested by block_number_option.
This commit is contained in:
Sergey Poznyakoff
2004-05-10 11:41:23 +00:00
parent 1c623b11f6
commit 4c004cff39

View File

@@ -171,6 +171,15 @@ read_and (void (*do_something) (void))
case HEADER_ZERO_BLOCK:
case HEADER_SUCCESS:
if (block_number_option)
{
char buf[UINTMAX_STRSIZE_BOUND];
off_t block_ordinal = current_block_ordinal ();
block_ordinal -= recent_long_name_blocks;
block_ordinal -= recent_long_link_blocks;
fprintf (stdlis, _("block %s: "),
STRINGIFY_BIGINT (block_ordinal, buf));
}
ERROR ((0, 0, _("Skipping to next header")));
break;