diff options
Diffstat (limited to 'src/statistics')
-rw-r--r-- | src/statistics/gnunet-statistics.c | 60 |
1 files changed, 38 insertions, 22 deletions
diff --git a/src/statistics/gnunet-statistics.c b/src/statistics/gnunet-statistics.c index ed0c3f27d..6cfc56171 100644 --- a/src/statistics/gnunet-statistics.c +++ b/src/statistics/gnunet-statistics.c | |||
@@ -378,28 +378,44 @@ run (void *cls, | |||
378 | int | 378 | int |
379 | main (int argc, char *const *argv) | 379 | main (int argc, char *const *argv) |
380 | { | 380 | { |
381 | static const struct GNUNET_GETOPT_CommandLineOption options[] = { | 381 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
382 | {'n', "name", "NAME", | 382 | GNUNET_GETOPT_OPTION_STRING ('n', |
383 | gettext_noop ("limit output to statistics for the given NAME"), 1, | 383 | "name", |
384 | &GNUNET_GETOPT_set_string, &name}, | 384 | "NAME", |
385 | {'p', "persistent", NULL, | 385 | gettext_noop ("limit output to statistics for the given NAME"), |
386 | gettext_noop ("make the value being set persistent"), 0, | 386 | &name), |
387 | &GNUNET_GETOPT_set_one, &persistent}, | 387 | |
388 | {'s', "subsystem", "SUBSYSTEM", | 388 | GNUNET_GETOPT_OPTION_SET_ONE ('p', |
389 | gettext_noop ("limit output to the given SUBSYSTEM"), 1, | 389 | "persistent", |
390 | &GNUNET_GETOPT_set_string, &subsystem}, | 390 | gettext_noop ("make the value being set persistent"), |
391 | {'q', "quiet", NULL, | 391 | &persistent), |
392 | gettext_noop ("just print the statistics value"), 0, | 392 | |
393 | &GNUNET_GETOPT_set_one, &quiet}, | 393 | GNUNET_GETOPT_OPTION_STRING ('s', |
394 | {'w', "watch", NULL, | 394 | "subsystem", |
395 | gettext_noop ("watch value continuously"), 0, | 395 | "SUBSYSTEM", |
396 | &GNUNET_GETOPT_set_one, &watch}, | 396 | gettext_noop ("limit output to the given SUBSYSTEM"), |
397 | {'r', "remote", NULL, | 397 | &subsystem), |
398 | gettext_noop ("connect to remote host"), 1, | 398 | |
399 | &GNUNET_GETOPT_set_string, &remote_host}, | 399 | GNUNET_GETOPT_OPTION_SET_ONE ('q', |
400 | {'o', "port", NULL, | 400 | "quiet", |
401 | gettext_noop ("port for remote host"), 1, | 401 | gettext_noop ("just print the statistics value"), |
402 | &GNUNET_GETOPT_set_uint, &remote_port}, | 402 | &quiet), |
403 | |||
404 | GNUNET_GETOPT_OPTION_SET_ONE ('w', | ||
405 | "watch", | ||
406 | gettext_noop ("watch value continuously"), | ||
407 | &watch), | ||
408 | |||
409 | GNUNET_GETOPT_OPTION_STRING ('r', | ||
410 | "remote", | ||
411 | "REMOTE", | ||
412 | gettext_noop ("connect to remote host"), | ||
413 | &remote_host), | ||
414 | GNUNET_GETOPT_OPTION_SET_ULONG ('o', | ||
415 | "port", | ||
416 | "PORT", | ||
417 | gettext_noop ("port for remote host"), | ||
418 | &remote_port), | ||
403 | GNUNET_GETOPT_OPTION_END | 419 | GNUNET_GETOPT_OPTION_END |
404 | }; | 420 | }; |
405 | remote_port = 0; | 421 | remote_port = 0; |