From d80e1bc430bf64debdb6b08f0b7e5c42836781fa Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Mon, 14 Dec 2015 09:38:46 +0100 Subject: common: Rename sh-exectool to exectool. * common/sh-exectool.c: Rename to exectool.c. * common/sh-exectool.h: Rename to exectool.h. * common/Makefile.am (common_sources): Adjust for rename. * common/exectool.c (sh_exec_tool_stream): Rename to gnupg_exec-tool-stream. (sh_exec_tool): Rename to gnupg_exec_tool. * tools/gpgtar-create.c (gpgtar_create): Adjust for changes. * tools/gpgtar-extract.c: Adjust for changes. * tools/gpgtar-list.c: Adjust for changes. -- The "sh-" presifx is used by g13 for system helpers which are used by processes created via userv. A generic function in common/ should also have a generic name. Signed-off-by: Werner Koch --- tools/gpgtar-list.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'tools/gpgtar-list.c') diff --git a/tools/gpgtar-list.c b/tools/gpgtar-list.c index 7bf4d494b..25c70d2a5 100644 --- a/tools/gpgtar-list.c +++ b/tools/gpgtar-list.c @@ -26,7 +26,7 @@ #include "i18n.h" #include "gpgtar.h" -#include "../common/sh-exectool.h" +#include "../common/exectool.h" @@ -64,7 +64,7 @@ parse_xoctal (const void *data, size_t length, const char *filename) } else { - log_error ("%s: invalid octal number encountered - assuming 0\n", + log_error ("%s: invalid octal number encountered - assuming 0\n", filename); value = 0; break; @@ -83,7 +83,7 @@ parse_header (const void *record, const char *filename) tar_header_t header; int use_prefix; - use_prefix = (!memcmp (raw->magic, "ustar", 5) + use_prefix = (!memcmp (raw->magic, "ustar", 5) && (raw->magic[5] == ' ' || !raw->magic[5])); @@ -135,7 +135,7 @@ parse_header (const void *record, const char *filename) n = 0; memcpy (header->name+n, raw->name, namelen); header->name[n+namelen] = 0; - + header->mode = parse_xoctal (raw->mode, sizeof raw->mode, filename); header->uid = parse_xoctal (raw->uid, sizeof raw->uid, filename); header->gid = parse_xoctal (raw->gid, sizeof raw->gid, filename); @@ -161,7 +161,7 @@ parse_header (const void *record, const char *filename) header->nrecords = (header->size + RECORDSIZE-1)/RECORDSIZE; else header->nrecords = 0; - + return header; } @@ -325,8 +325,8 @@ gpgtar_list (const char *filename, int decrypt) argv[i++] = NULL; assert (i == strlist_length (opt.gpg_arguments) + 2); - err = sh_exec_tool_stream (opt.gpg_program, argv, - cipher_stream, stream); + err = gnupg_exec_tool_stream (opt.gpg_program, argv, + cipher_stream, stream); xfree (argv); if (err) goto leave; -- cgit v1.2.3