summaryrefslogtreecommitdiffstats
path: root/g10/tdbdump.c
diff options
context:
space:
mode:
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>2017-02-26 00:02:27 +0100
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>2017-02-26 07:46:54 +0100
commitddf01a67d6388d988f1db50a06facb21c14d9426 (patch)
tree4ce6ec40cbd987f778c07cdf9de9693a7665d201 /g10/tdbdump.c
parentg10: fix typo (diff)
downloadgnupg2-ddf01a67d6388d988f1db50a06facb21c14d9426.tar.xz
gnupg2-ddf01a67d6388d988f1db50a06facb21c14d9426.zip
trustdb: Respect --quiet during --import-ownertrust.
* g10/tdbdump.c (import_ownertrust): If opt.quiet is set, do not send log_info messages. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
Diffstat (limited to 'g10/tdbdump.c')
-rw-r--r--g10/tdbdump.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/g10/tdbdump.c b/g10/tdbdump.c
index 41a025871..be9d1f2e6 100644
--- a/g10/tdbdump.c
+++ b/g10/tdbdump.c
@@ -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;