gpgtar: Improve error messages.
authorWerner Koch <wk@gnupg.org>
Wed, 6 Mar 2019 16:46:40 +0000 (17:46 +0100)
committerWerner Koch <wk@gnupg.org>
Wed, 6 Mar 2019 16:46:40 +0000 (17:46 +0100)
commit72feb8fa8280aba674573a1afc955a92e8065242
treedb50444e2af494ac8842f1a864953bdcf3da2e73
parent05eff1f6623c272fcabd4e238842afc832710324
gpgtar: Improve error messages.

* tools/gpgtar.h (struct tarinfo_s): New.
* tools/gpgtar.c (cmd, skip_crypto, files_from, null_names): Move
global vars more to the top.
(set_cmd): Rename 'cmd' to 'c'.
* tools/gpgtar-list.c (parse_header): Add arg 'info' and improve error
messages.
(read_header): Add arg 'info' and update counter.
(skip_data): Ditto.
(gpgtar_list): Pass info object to read functions.
(gpgtar_read_header): Add arg 'info'.
* tools/gpgtar-extract.c (gpgtar_extract): add arg 'info' and pass on.
(extract_regular): Add arg 'info' and update counter.
--

This now prints the block number of a header with error.

Signed-off-by: Werner Koch <wk@gnupg.org>
tools/gpgtar-extract.c
tools/gpgtar-list.c
tools/gpgtar.c
tools/gpgtar.h