diff options
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/common_logging.c | 16 | ||||
-rw-r--r-- | src/util/gnunet-config.c | 11 |
2 files changed, 14 insertions, 13 deletions
diff --git a/src/util/common_logging.c b/src/util/common_logging.c index b30175543..48cc6fe3b 100644 --- a/src/util/common_logging.c +++ b/src/util/common_logging.c | |||
@@ -246,27 +246,27 @@ static int gnunet_force_log_present; | |||
246 | 246 | ||
247 | /** | 247 | /** |
248 | * Convert a textual description of a loglevel | 248 | * Convert a textual description of a loglevel |
249 | * to the respective GNUNET_GE_KIND. | 249 | * to the respective enumeration type. |
250 | * | 250 | * |
251 | * @param log loglevel to parse | 251 | * @param log loglevel to parse |
252 | * @return GNUNET_GE_INVALID if log does not parse | 252 | * @return GNUNET_ERROR_TYPE_INVALID if log does not parse |
253 | */ | 253 | */ |
254 | static enum GNUNET_ErrorType | 254 | static enum GNUNET_ErrorType |
255 | get_type (const char *log) | 255 | get_type (const char *log) |
256 | { | 256 | { |
257 | if (NULL == log) | 257 | if (NULL == log) |
258 | return GNUNET_ERROR_TYPE_UNSPECIFIED; | 258 | return GNUNET_ERROR_TYPE_UNSPECIFIED; |
259 | if (0 == strcasecmp (log, _ ("DEBUG"))) | 259 | if (0 == strcasecmp (log, "DEBUG")) |
260 | return GNUNET_ERROR_TYPE_DEBUG; | 260 | return GNUNET_ERROR_TYPE_DEBUG; |
261 | if (0 == strcasecmp (log, _ ("INFO"))) | 261 | if (0 == strcasecmp (log, "INFO")) |
262 | return GNUNET_ERROR_TYPE_INFO; | 262 | return GNUNET_ERROR_TYPE_INFO; |
263 | if (0 == strcasecmp (log, _ ("MESSAGE"))) | 263 | if (0 == strcasecmp (log, "MESSAGE")) |
264 | return GNUNET_ERROR_TYPE_MESSAGE; | 264 | return GNUNET_ERROR_TYPE_MESSAGE; |
265 | if (0 == strcasecmp (log, _ ("WARNING"))) | 265 | if (0 == strcasecmp (log, "WARNING")) |
266 | return GNUNET_ERROR_TYPE_WARNING; | 266 | return GNUNET_ERROR_TYPE_WARNING; |
267 | if (0 == strcasecmp (log, _ ("ERROR"))) | 267 | if (0 == strcasecmp (log, "ERROR")) |
268 | return GNUNET_ERROR_TYPE_ERROR; | 268 | return GNUNET_ERROR_TYPE_ERROR; |
269 | if (0 == strcasecmp (log, _ ("NONE"))) | 269 | if (0 == strcasecmp (log, "NONE")) |
270 | return GNUNET_ERROR_TYPE_NONE; | 270 | return GNUNET_ERROR_TYPE_NONE; |
271 | return GNUNET_ERROR_TYPE_INVALID; | 271 | return GNUNET_ERROR_TYPE_INVALID; |
272 | } | 272 | } |
diff --git a/src/util/gnunet-config.c b/src/util/gnunet-config.c index 2b279dda2..4d050cdd3 100644 --- a/src/util/gnunet-config.c +++ b/src/util/gnunet-config.c | |||
@@ -65,10 +65,11 @@ static int list_sections; | |||
65 | static int global_ret; | 65 | static int global_ret; |
66 | 66 | ||
67 | /** | 67 | /** |
68 | * Should we generate a configuration file that is clean and | 68 | * Should the generated configuration file contain the whole configuration, or |
69 | * only contains the deltas to the defaults? | 69 | * just the differences with the defaults? |
70 | * If set to a non-zero value, the full configuration will be written to file. | ||
70 | */ | 71 | */ |
71 | static int rewrite; | 72 | static int rewrite = 0; |
72 | 73 | ||
73 | 74 | ||
74 | /** | 75 | /** |
@@ -157,7 +158,7 @@ run (void *cls, | |||
157 | GNUNET_free (name); | 158 | GNUNET_free (name); |
158 | return; | 159 | return; |
159 | } | 160 | } |
160 | if (rewrite) | 161 | if (!rewrite) |
161 | { | 162 | { |
162 | struct GNUNET_CONFIGURATION_Handle *def; | 163 | struct GNUNET_CONFIGURATION_Handle *def; |
163 | 164 | ||
@@ -315,7 +316,7 @@ main (int argc, char *const *argv) | |||
315 | 'w', | 316 | 'w', |
316 | "rewrite", | 317 | "rewrite", |
317 | gettext_noop ( | 318 | gettext_noop ( |
318 | "write configuration file that only contains delta to defaults"), | 319 | "write the full configuration file, including default values"), |
319 | &rewrite), | 320 | &rewrite), |
320 | GNUNET_GETOPT_OPTION_END }; | 321 | GNUNET_GETOPT_OPTION_END }; |
321 | int ret; | 322 | int ret; |