aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-03-25 21:25:00 +0100
committerChristian Grothoff <christian@grothoff.org>2017-03-25 21:25:00 +0100
commit3503aeff6db6b39b85e13f9483d46d49ce9cec55 (patch)
tree5ebe2bd86e7e5562ea16708ccaaf1531c4e0d286
parent04f723b71631c1c908c695b8edb7bad68fd58014 (diff)
downloadgnunet-fuse-3503aeff6db6b39b85e13f9483d46d49ce9cec55.tar.gz
gnunet-fuse-3503aeff6db6b39b85e13f9483d46d49ce9cec55.zip
port to current GNUNET_GETOPT API
-rw-r--r--src/fuse/gnunet-fuse.c34
1 files changed, 22 insertions, 12 deletions
diff --git a/src/fuse/gnunet-fuse.c b/src/fuse/gnunet-fuse.c
index aeebb46..7d71975 100644
--- a/src/fuse/gnunet-fuse.c
+++ b/src/fuse/gnunet-fuse.c
@@ -496,26 +496,36 @@ run (void *cls,
496int 496int
497main (int argc, char *const *argv) 497main (int argc, char *const *argv)
498{ 498{
499 static const struct GNUNET_GETOPT_CommandLineOption options[] = { 499 struct GNUNET_GETOPT_CommandLineOption options[] = {
500 {'s', "source", "URI", 500 GNUNET_GETOPT_option_string ('s',
501 gettext_noop ("Source you get the URI from"), 1, 501 "source",
502 &GNUNET_GETOPT_set_string, &source}, 502 "URI",
503 {'d', "directory", "PATH", 503 gettext_noop ("Source you get the URI from"),
504 gettext_noop ("path to your mountpoint"), 1, 504 &source),
505 &GNUNET_GETOPT_set_string, &directory}, 505 GNUNET_GETOPT_option_filename ('d',
506 {'t', "single-threaded", NULL, 506 "directory",
507 gettext_noop ("run in single-threaded mode"), 0, 507 "PATH",
508 &GNUNET_GETOPT_set_one, &single_threaded}, 508 gettext_noop ("path to your mountpoint"),
509 &directory),
510 GNUNET_GETOPT_option_flag ('t',
511 "single-threaded",
512 gettext_noop ("run in single-threaded mode"),
513 &single_threaded),
509 GNUNET_GETOPT_OPTION_END 514 GNUNET_GETOPT_OPTION_END
510 }; 515 };
511 GNUNET_log_setup ("gnunet-fuse", "DEBUG", NULL); 516 GNUNET_log_setup ("gnunet-fuse",
517 "DEBUG",
518 NULL);
512 return (GNUNET_OK == 519 return (GNUNET_OK ==
513 GNUNET_PROGRAM_run2 (argc, 520 GNUNET_PROGRAM_run2 (argc,
514 argv, 521 argv,
515 "gnunet-fuse -s URI [-- FUSE-OPTIONS] DIRECTORYNAME", 522 "gnunet-fuse -s URI [-- FUSE-OPTIONS] DIRECTORYNAME",
516 gettext_noop 523 gettext_noop
517 ("fuse"), 524 ("fuse"),
518 options, &run, NULL, GNUNET_YES)) ? ret : 1; 525 options,
526 &run,
527 NULL,
528 GNUNET_YES)) ? ret : 1;
519} 529}
520 530
521/* end of gnunet-fuse.c */ 531/* end of gnunet-fuse.c */