From 51edea995d352a7b557fb0315fa5091dc42065cb Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Tue, 1 Feb 2022 15:13:13 +0100 Subject: [PATCH] gpg,sm: Set --verbose and clear --quiet in debug mode. * g10/gpg.c (set_debug): Tweak options. * sm/gpgsm.c (set_debug): Ditto. --- g10/gpg.c | 6 ++++++ sm/gpgsm.c | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/g10/gpg.c b/g10/gpg.c index 8c1aa96d4..1155f501c 100644 --- a/g10/gpg.c +++ b/g10/gpg.c @@ -1368,6 +1368,12 @@ set_debug (const char *level) if (opt.debug) parse_debug_flag (NULL, &opt.debug, debug_flags); + /* Make sure that we are --verbose in debug mode. */ + if (opt.debug && !opt.verbose) + opt.verbose = 1; + if (opt.debug && opt.quiet) + opt.quiet = 0; + if (opt_set_iobuf_size || opt_set_iobuf_size_used) log_debug ("iobuf buffer size is %uk\n", iobuf_set_buffer_size (opt_set_iobuf_size)); diff --git a/sm/gpgsm.c b/sm/gpgsm.c index b95edf83b..0a720904b 100644 --- a/sm/gpgsm.c +++ b/sm/gpgsm.c @@ -779,6 +779,12 @@ set_debug (void) if (opt.debug) parse_debug_flag (NULL, &opt.debug, debug_flags); + /* Make sure that we are --verbose in debug mode. */ + if (opt.debug && !opt.verbose) + opt.verbose = 1; + if (opt.debug && opt.quiet) + opt.quiet = 0; + /* minip12.c may be used outside of GnuPG, thus we don't have the * opt structure over there. */ p12_set_verbosity (opt.verbose);