aboutsummaryrefslogtreecommitdiffstats
path: root/tools/gpgconf.c
diff options
context:
space:
mode:
authorMarcus Brinkmann <[email protected]>2008-05-26 13:43:20 +0000
committerMarcus Brinkmann <[email protected]>2008-05-26 13:43:20 +0000
commit9c10eb6625afacb997e716d7168dafaecff9aab7 (patch)
tree5d41b98303210e02bb8f12088c7f69e642a57198 /tools/gpgconf.c
parentMake --runtime option of gpgconf under W32 work. (diff)
downloadgnupg-9c10eb6625afacb997e716d7168dafaecff9aab7.tar.gz
gnupg-9c10eb6625afacb997e716d7168dafaecff9aab7.zip
doc/
2008-05-26 Marcus Brinkmann <[email protected]> * tools.texi (Invoking gpgconf): Document --list-dirs. tools/ 2008-05-26 Marcus Brinkmann <[email protected]> * gpgconf.c (enum cmd_and_opt_values): Add aListDirs. (opts): Add aListDirs option. (main): Handle aListDirs. * gpgconf.h (gc_percent_escape): New declaration. * gpgconf-comp.c (my_percent_escape): Make non-static and rename to ... (gc_percent_escape): ... this. Change all callers.
Diffstat (limited to 'tools/gpgconf.c')
-rw-r--r--tools/gpgconf.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/tools/gpgconf.c b/tools/gpgconf.c
index 8813d545b..bf9767146 100644
--- a/tools/gpgconf.c
+++ b/tools/gpgconf.c
@@ -46,7 +46,8 @@ enum cmd_and_opt_values
aCheckOptions,
aApplyDefaults,
aListConfig,
- aCheckConfig
+ aCheckConfig,
+ aListDirs
};
@@ -63,6 +64,8 @@ static ARGPARSE_OPTS opts[] =
{ aCheckOptions, "check-options", 256, N_("|COMPONENT|check options") },
{ aApplyDefaults, "apply-defaults", 256,
N_("apply global default values") },
+ { aListDirs, "list-dirs", 256,
+ N_("get the configuration directories for gpgconf") },
{ aListConfig, "list-config", 256,
N_("list global configuration file") },
{ aCheckConfig, "check-config", 256,
@@ -165,6 +168,7 @@ main (int argc, char **argv)
case oVerbose: opt.verbose++; break;
case oNoVerbose: opt.verbose = 0; break;
+ case aListDirs:
case aListComponents:
case aCheckPrograms:
case aListOptions:
@@ -253,6 +257,13 @@ main (int argc, char **argv)
if (gc_process_gpgconf_conf (NULL, 1, 1, NULL))
exit (1);
break;
+
+ case aListDirs:
+ /* Show the system configuration directory for gpgconf. */
+ get_outfp (&outfp);
+ fprintf (outfp, "sysconfdir:%s\n",
+ gc_percent_escape (gnupg_sysconfdir ()));
+ break;
}
if (outfp && outfp != stdout)