mirror of
https://git.savannah.gnu.org/git/tar.git
synced 2026-08-21 16:56:06 +00:00
Optionally warn about missing zero blocks at the end of the archive
(In response to savannah bug #63574) * doc/intern.texi: Document actual tar behaviour in regard to missing end-of-file marker. * doc/tar.texi: Rewrite the "warnings" section. Document --warning=missing-zero-blocks * src/common.h (WARN_MISSING_ZERO_BLOCKS): New constant. (WARN_ALL): Include all warning bits. * src/list.c (read_and): If EOF is reached without seeing end-of-file blocks and the "missing-zero-blocks" warning is requested, warn about the fact. * src/warning.c: New warnings: "missing-zero-blocks", "verbose". (warning_option): Change definition to reflect changes in common.h
This commit is contained in:
@@ -256,6 +256,13 @@ read_and (void (*do_something) (void))
|
||||
continue;
|
||||
|
||||
case HEADER_END_OF_FILE:
|
||||
if (!ignore_zeros_option)
|
||||
{
|
||||
char buf[UINTMAX_STRSIZE_BOUND];
|
||||
WARNOPT (WARN_MISSING_ZERO_BLOCKS,
|
||||
(0, 0, _("Terminating zero blocks missing at %s"),
|
||||
STRINGIFY_BIGINT (current_block_ordinal (), buf)));
|
||||
}
|
||||
if (block_number_option)
|
||||
{
|
||||
char buf[UINTMAX_STRSIZE_BOUND];
|
||||
|
||||
Reference in New Issue
Block a user