From d9787447fe6a57e39113b60305b4ab672b9ba897 Mon Sep 17 00:00:00 2001 From: DongHun Kwak Date: Tue, 9 Feb 2021 16:00:19 +0900 Subject: Imported Upstream version 2.1.19 --- g10/tdbdump.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'g10/tdbdump.c') 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; -- cgit v1.2.3