1
0
mirror of git://git.gnupg.org/gnupg.git synced 2025-01-10 13:04:23 +01:00

gpg: Make "--list-options show-sig-subpackets=n,m" work again.

* g10/gpg.c (parse_list_options): Set value for show-sig-subpackets.
--

Fixes-commit: b6ba7054a04a759ea690c1b1bdc023acd9214fe2
This commit is contained in:
Werner Koch 2023-01-31 11:32:41 +01:00
parent fbc1813779
commit 67a2973bf9
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B

View File

@ -2018,6 +2018,8 @@ parse_list_options(char *str)
char *subpackets=""; /* something that isn't NULL */ char *subpackets=""; /* something that isn't NULL */
struct parse_options lopts[]= struct parse_options lopts[]=
{ {
{"show-sig-subpackets",LIST_SHOW_SIG_SUBPACKETS,NULL,
NULL},
{"show-photos",LIST_SHOW_PHOTOS,NULL, {"show-photos",LIST_SHOW_PHOTOS,NULL,
N_("display photo IDs during key listings")}, N_("display photo IDs during key listings")},
{"show-usage",LIST_SHOW_USAGE,NULL, {"show-usage",LIST_SHOW_USAGE,NULL,
@ -2048,18 +2050,23 @@ parse_list_options(char *str)
N_("show preferences")}, N_("show preferences")},
{"show-pref-verbose", LIST_SHOW_PREF_VERBOSE, NULL, {"show-pref-verbose", LIST_SHOW_PREF_VERBOSE, NULL,
N_("show preferences")}, N_("show preferences")},
{"show-sig-subpackets",LIST_SHOW_SIG_SUBPACKETS,NULL,
NULL},
{"show-only-fpr-mbox",LIST_SHOW_ONLY_FPR_MBOX, NULL, {"show-only-fpr-mbox",LIST_SHOW_ONLY_FPR_MBOX, NULL,
NULL}, NULL},
{NULL,0,NULL,NULL} {NULL,0,NULL,NULL}
}; };
int i;
/* C99 allows for non-constant initializers, but we'd like to /* C99 allows for non-constant initializers, but we'd like to
compile everywhere, so fill in the show-sig-subpackets argument compile everywhere, so fill in the show-sig-subpackets argument
here. Note that if the parse_options array changes, we'll have here. Note that if the parse_options array changes, we'll have
to change the subscript here. */ to change the subscript here. We use a loop here in case the
lopts[13].value=&subpackets; list above is reordered. */
for (i=0; lopts[i].name; i++)
if (lopts[i].bit == LIST_SHOW_SIG_SUBPACKETS)
{
lopts[i].value = &subpackets;
break;
}
if(parse_options(str,&opt.list_options,lopts,1)) if(parse_options(str,&opt.list_options,lopts,1))
{ {