aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/util')
-rw-r--r--src/util/gnunet-config.c30
1 files changed, 23 insertions, 7 deletions
diff --git a/src/util/gnunet-config.c b/src/util/gnunet-config.c
index 81e09fdbf8..c01528a450 100644
--- a/src/util/gnunet-config.c
+++ b/src/util/gnunet-config.c
@@ -72,12 +72,28 @@ print_option (void *cls,
const char *option,
const char *value)
{
- (void) cls;
(void) section;
- fprintf (stdout,
- "%s = %s\n",
- option,
- value);
+ const struct GNUNET_CONFIGURATION_Handle *cfg = cls;
+ char *value_fn;
+ if (is_filename)
+ {
+ GNUNET_assert (GNUNET_OK ==
+ GNUNET_CONFIGURATION_get_value_filename (cfg,
+ section,
+ option,
+ &value_fn));
+ fprintf (stdout,
+ "%s = %s\n",
+ option,
+ GNUNET_STRINGS_filename_expand (value_fn));
+ }
+ else
+ {
+ fprintf (stdout,
+ "%s = %s\n",
+ option,
+ value);
+ }
}
@@ -156,8 +172,8 @@ run (void *cls,
{
GNUNET_CONFIGURATION_iterate_section_values (cfg,
section,
- &print_option,
- NULL);
+ &print_option,
+ (void *) cfg);
}
else
{