summaryrefslogtreecommitdiff
path: root/g10/tdbdump.c
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2021-02-09 16:00:19 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2021-02-09 16:00:19 +0900
commitd9787447fe6a57e39113b60305b4ab672b9ba897 (patch)
tree6c925adf6340a1a5ab43d9048ca4b27eae819cd6 /g10/tdbdump.c
parentf77eedfaad1525168ca8593a3eb43ef157cd2891 (diff)
downloadgpg2-d9787447fe6a57e39113b60305b4ab672b9ba897.tar.gz
gpg2-d9787447fe6a57e39113b60305b4ab672b9ba897.tar.bz2
gpg2-d9787447fe6a57e39113b60305b4ab672b9ba897.zip
Imported Upstream version 2.1.19upstream/2.1.19
Diffstat (limited to 'g10/tdbdump.c')
-rw-r--r--g10/tdbdump.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/g10/tdbdump.c b/g10/tdbdump.c
index 41a0258..ab2f072 100644
--- a/g10/tdbdump.c
+++ b/g10/tdbdump.c
@@ -70,7 +70,7 @@ list_trustdb (estream_t fp, const char *username)
(void)username;
- init_trustdb();
+ init_trustdb (0);
/* For now we ignore the user ID. */
if (1)
{
@@ -101,7 +101,7 @@ export_ownertrust()
int i;
byte *p;
- init_trustdb();
+ init_trustdb (0);
es_printf (_("# List of assigned trustvalues, created %s\n"
"# (Use \"gpg --import-ownertrust\" to restore them)\n"),
asctimestamp( make_timestamp() ) );
@@ -133,7 +133,7 @@ import_ownertrust( const char *fname )
int any = 0;
int rc;
- init_trustdb();
+ init_trustdb (0);
if( iobuf_is_pipe_filename (fname) ) {
fp = es_stdin;
fname = "[stdin]";
@@ -193,18 +193,22 @@ import_ownertrust( const char *fname )
if( !rc ) { /* found: update */
if (rec.r.trust.ownertrust != otrust)
{
- if( rec.r.trust.ownertrust )
- log_info("changing ownertrust from %u to %u\n",
- rec.r.trust.ownertrust, otrust );
- else
- log_info("setting ownertrust to %u\n", otrust );
+ if (!opt.quiet)
+ {
+ if( rec.r.trust.ownertrust )
+ log_info("changing ownertrust from %u to %u\n",
+ rec.r.trust.ownertrust, otrust );
+ else
+ log_info("setting ownertrust to %u\n", otrust );
+ }
rec.r.trust.ownertrust = otrust;
write_record (&rec );
any = 1;
}
}
else if (gpg_err_code (rc) == GPG_ERR_NOT_FOUND) { /* insert */
- log_info("inserting ownertrust of %u\n", otrust );
+ if (!opt.quiet)
+ log_info("inserting ownertrust of %u\n", otrust );
memset (&rec, 0, sizeof rec);
rec.recnum = tdbio_new_recnum ();
rec.rectype = RECTYPE_TRUST;