mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
gpgconf: Support reading global options (part 1).
* tools/gpgconf.c (main): Set the coinfig directories. * tools/gpgconf-comp.c (gc_backend): Change the name of the config files. (struct gc_option): Add new field 'attr'. (retrieve_options_from_program): Rewrite to use gpgrt_argparser. -- We need to do larger changes to gpgconf so that it is possible to get also global config options and their attributes. The old code worked along its own list of option and used a generic option file parser. This has no support for global config files. We now use gpgrt_argparser so that we to do exactly the same as the component does and thus delivers the actual option values as seen by the component. This is just a first step and we need to change more things. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
6fa1808cb7
commit
d2425d1495
2 changed files with 191 additions and 102 deletions
|
@ -620,6 +620,12 @@ main (int argc, char **argv)
|
|||
|
||||
fname = argc ? *argv : NULL;
|
||||
|
||||
/* Set the configuraton directories for use by gpgrt_argparser. We
|
||||
* don't have a configuration file for this program but we have code
|
||||
* which reads the component's config files. */
|
||||
gpgrt_set_confdir (GPGRT_CONFDIR_SYS, gnupg_sysconfdir ());
|
||||
gpgrt_set_confdir (GPGRT_CONFDIR_USER, gnupg_homedir ());
|
||||
|
||||
switch (cmd)
|
||||
{
|
||||
case aListComponents:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue