summaryrefslogtreecommitdiffstats
path: root/tools/gpgtar-list.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2015-12-14 09:38:46 +0100
committerWerner Koch <wk@gnupg.org>2015-12-14 16:21:19 +0100
commitd80e1bc430bf64debdb6b08f0b7e5c42836781fa (patch)
treef84c394ab4fa41265400524849c77bce16285670 /tools/gpgtar-list.c
parentgpg: Print ownertrust in TOFU+PGP trust model. (diff)
downloadgnupg2-d80e1bc430bf64debdb6b08f0b7e5c42836781fa.tar.xz
gnupg2-d80e1bc430bf64debdb6b08f0b7e5c42836781fa.zip
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 <wk@gnupg.org>
Diffstat (limited to 'tools/gpgtar-list.c')
-rw-r--r--tools/gpgtar-list.c14
1 files changed, 7 insertions, 7 deletions
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;