diff options
author | Christian Grothoff <christian@grothoff.org> | 2018-12-11 10:21:39 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2018-12-11 10:21:39 +0100 |
commit | ee10b40c55c154400bbefd13175bd8b280cb7798 (patch) | |
tree | d475fcde922f4a5e413fb4b76c8784eb48fe71d3 /src/util/gnunet-config.c | |
parent | 70ae2bd54ee0ff610d95a63856f38395920b804d (diff) | |
download | gnunet-ee10b40c55c154400bbefd13175bd8b280cb7798.tar.gz gnunet-ee10b40c55c154400bbefd13175bd8b280cb7798.zip |
fail hard if configuration file specified via -c does not exist (in all services and programs)
Diffstat (limited to 'src/util/gnunet-config.c')
-rw-r--r-- | src/util/gnunet-config.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/src/util/gnunet-config.c b/src/util/gnunet-config.c index 4528bbe24..46c523da4 100644 --- a/src/util/gnunet-config.c +++ b/src/util/gnunet-config.c | |||
@@ -11,7 +11,7 @@ | |||
11 | WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Affero General Public License for more details. | 13 | Affero General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU Affero General Public License | 15 | You should have received a copy of the GNU Affero General Public License |
16 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 16 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | */ | 17 | */ |
@@ -82,7 +82,7 @@ print_option (void *cls, | |||
82 | { | 82 | { |
83 | char *value_fn; | 83 | char *value_fn; |
84 | char *fn; | 84 | char *fn; |
85 | 85 | ||
86 | GNUNET_assert (GNUNET_OK == | 86 | GNUNET_assert (GNUNET_OK == |
87 | GNUNET_CONFIGURATION_get_value_filename (cfg, | 87 | GNUNET_CONFIGURATION_get_value_filename (cfg, |
88 | section, | 88 | section, |
@@ -167,14 +167,19 @@ run (void *cls, | |||
167 | if (! list_sections) | 167 | if (! list_sections) |
168 | { | 168 | { |
169 | fprintf (stderr, | 169 | fprintf (stderr, |
170 | _("--section argument is required\n")); | 170 | _("%s or %s argument is required\n"), |
171 | "--section", | ||
172 | "--list-sections"); | ||
173 | ret = 1; | ||
174 | } | ||
175 | else | ||
176 | { | ||
177 | fprintf (stderr, | ||
178 | _("The following sections are available:\n")); | ||
179 | GNUNET_CONFIGURATION_iterate_sections (cfg, | ||
180 | &print_section_name, | ||
181 | NULL); | ||
171 | } | 182 | } |
172 | fprintf (stderr, | ||
173 | _("The following sections are available:\n")); | ||
174 | GNUNET_CONFIGURATION_iterate_sections (cfg, | ||
175 | &print_section_name, | ||
176 | NULL); | ||
177 | ret = 1; | ||
178 | goto cleanup; | 183 | goto cleanup; |
179 | } | 184 | } |
180 | 185 | ||