diff options
Diffstat (limited to 'src/util/gnunet-config.c')
-rw-r--r-- | src/util/gnunet-config.c | 48 |
1 files changed, 31 insertions, 17 deletions
diff --git a/src/util/gnunet-config.c b/src/util/gnunet-config.c index 5f7d9fc0da..16b826ee2f 100644 --- a/src/util/gnunet-config.c +++ b/src/util/gnunet-config.c @@ -2,20 +2,18 @@ This file is part of GNUnet. Copyright (C) 2012 GNUnet e.V. - GNUnet is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3, or (at your - option) any later version. + GNUnet is free software: you can redistribute it and/or modify it + under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, either version 3 of the License, + or (at your option) any later version. GNUnet is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GNUnet; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. + Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ /** @@ -77,12 +75,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); + } } @@ -161,8 +175,8 @@ run (void *cls, { GNUNET_CONFIGURATION_iterate_section_values (cfg, section, - &print_option, - NULL); + &print_option, + (void *) cfg); } else { |