diff options
Diffstat (limited to 'src/util/getopt_helpers.c')
-rw-r--r-- | src/util/getopt_helpers.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/util/getopt_helpers.c b/src/util/getopt_helpers.c index 5940c3ff9..f0f96d0d9 100644 --- a/src/util/getopt_helpers.c +++ b/src/util/getopt_helpers.c | |||
@@ -234,6 +234,18 @@ GNUNET_GETOPT_set_string (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, | |||
234 | } | 234 | } |
235 | 235 | ||
236 | 236 | ||
237 | int | ||
238 | GNUNET_GETOPT_set_filename (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, | ||
239 | void *scls, const char *option, const char *value) | ||
240 | { | ||
241 | char **val = scls; | ||
242 | |||
243 | GNUNET_assert (value != NULL); | ||
244 | GNUNET_free_non_null (*val); | ||
245 | *val = GNUNET_STRINGS_filename_expand (value); | ||
246 | return GNUNET_OK; | ||
247 | } | ||
248 | |||
237 | /** | 249 | /** |
238 | * Set an option of type 'unsigned long long' from the command line. | 250 | * Set an option of type 'unsigned long long' from the command line. |
239 | * A pointer to this function should be passed as part of the | 251 | * A pointer to this function should be passed as part of the |