diff options
author | Justus Winter <justus@g10code.com> | 2015-11-25 13:39:50 +0100 |
---|---|---|
committer | Justus Winter <justus@g10code.com> | 2015-11-25 14:34:16 +0100 |
commit | f76fb047c15914ba44dc9423d235484758bcd721 (patch) | |
tree | a3ea6388c08ff2544a36409c7f4a1c3fcc3a3d24 /tools/gpgtar.h | |
parent | tools: Add encryption and decryption support to gpgtar. (diff) | |
download | gnupg2-f76fb047c15914ba44dc9423d235484758bcd721.tar.xz gnupg2-f76fb047c15914ba44dc9423d235484758bcd721.zip |
tools/gpgtar: Improve error handling.
* tools/gpgtar-create.c (gpgtar_create): Return an error code, fix
error handling.
* tools/gpgtar-extract.c (gpgtar_extract): Likewise.
* tools/gpgtar-list.c (read_header): Return an error code.
(gpgtar_list): Return an error code, fix error handling.
(gpgtar_read_header): Return an error code.
* tools/gpgtar.c: Add missing include.
(main): Print an generic error message if a command failed and no
error has been printed yet.
* tools/gpgtar.h (gpgtar_{create,extract,list,read_header}): Fix the
prototypes accordingly.
Signed-off-by: Justus Winter <justus@g10code.com>
Diffstat (limited to 'tools/gpgtar.h')
-rw-r--r-- | tools/gpgtar.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/gpgtar.h b/tools/gpgtar.h index a96ee09b3..ab2ccecc1 100644 --- a/tools/gpgtar.h +++ b/tools/gpgtar.h @@ -115,14 +115,14 @@ gpg_error_t read_record (estream_t stream, void *record); gpg_error_t write_record (estream_t stream, const void *record); /*-- gpgtar-create.c --*/ -void gpgtar_create (char **inpattern, int encrypt); +gpg_error_t gpgtar_create (char **inpattern, int encrypt); /*-- gpgtar-extract.c --*/ -void gpgtar_extract (const char *filename, int decrypt); +gpg_error_t gpgtar_extract (const char *filename, int decrypt); /*-- gpgtar-list.c --*/ -void gpgtar_list (const char *filename, int decrypt); -tar_header_t gpgtar_read_header (estream_t stream); +gpg_error_t gpgtar_list (const char *filename, int decrypt); +gpg_error_t gpgtar_read_header (estream_t stream, tar_header_t *r_header); void gpgtar_print_header (tar_header_t header, estream_t out); |