diff options
author | Marcello Stanisci <marcello.stanisci@inria.fr> | 2017-03-15 15:28:41 +0100 |
---|---|---|
committer | Marcello Stanisci <marcello.stanisci@inria.fr> | 2017-03-15 15:28:41 +0100 |
commit | 5d6ed5fbda01a324d8d9b800928339d4a90343c3 (patch) | |
tree | b52f65dfc01e42f989df7aa2569ae69695fd9a54 /src/testbed | |
parent | 294393abdca9f482321696e9aaec64b1a0488607 (diff) | |
download | gnunet-5d6ed5fbda01a324d8d9b800928339d4a90343c3.tar.gz gnunet-5d6ed5fbda01a324d8d9b800928339d4a90343c3.zip |
Still porting to new getopt API.
Diffstat (limited to 'src/testbed')
-rw-r--r-- | src/testbed/generate-underlay-topology.c | 12 | ||||
-rw-r--r-- | src/testbed/gnunet-testbed-profiler.c | 43 |
2 files changed, 35 insertions, 20 deletions
diff --git a/src/testbed/generate-underlay-topology.c b/src/testbed/generate-underlay-topology.c index 36580a2a3..ab7d81c8b 100644 --- a/src/testbed/generate-underlay-topology.c +++ b/src/testbed/generate-underlay-topology.c | |||
@@ -70,7 +70,7 @@ enum GNUNET_TESTBED_TopologyOption topology; | |||
70 | /** | 70 | /** |
71 | * The number of peers to include in the topology | 71 | * The number of peers to include in the topology |
72 | */ | 72 | */ |
73 | static int num_peers; | 73 | static unsigned int num_peers; |
74 | 74 | ||
75 | /** | 75 | /** |
76 | * program result | 76 | * program result |
@@ -335,11 +335,15 @@ int | |||
335 | main (int argc, char *const argv[]) | 335 | main (int argc, char *const argv[]) |
336 | { | 336 | { |
337 | struct GNUNET_GETOPT_CommandLineOption option[] = { | 337 | struct GNUNET_GETOPT_CommandLineOption option[] = { |
338 | {'p', "num-peers", "COUNT", | 338 | |
339 | gettext_noop ("create COUNT number of peers"), | 339 | GNUNET_GETOPT_OPTION_SET_UINT ('p', |
340 | GNUNET_YES, &GNUNET_GETOPT_set_uint, &num_peers}, | 340 | "num-peers", |
341 | "COUNT", | ||
342 | gettext_noop ("create COUNT number of peers"), | ||
343 | &num_peers), | ||
341 | GNUNET_GETOPT_OPTION_END | 344 | GNUNET_GETOPT_OPTION_END |
342 | }; | 345 | }; |
346 | |||
343 | int ret; | 347 | int ret; |
344 | 348 | ||
345 | exit_result = GNUNET_SYSERR; | 349 | exit_result = GNUNET_SYSERR; |
diff --git a/src/testbed/gnunet-testbed-profiler.c b/src/testbed/gnunet-testbed-profiler.c index 9468b3c91..29f77193d 100644 --- a/src/testbed/gnunet-testbed-profiler.c +++ b/src/testbed/gnunet-testbed-profiler.c | |||
@@ -276,23 +276,34 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
276 | int | 276 | int |
277 | main (int argc, char *const *argv) | 277 | main (int argc, char *const *argv) |
278 | { | 278 | { |
279 | static const struct GNUNET_GETOPT_CommandLineOption options[] = { | 279 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
280 | {'p', "num-peers", "COUNT", | 280 | |
281 | gettext_noop ("create COUNT number of peers"), | 281 | GNUNET_GETOPT_OPTION_SET_UINT ('p', |
282 | GNUNET_YES, &GNUNET_GETOPT_set_uint, &num_peers}, | 282 | "num-peers", |
283 | {'e', "num-errors", "COUNT", | 283 | "COUNT", |
284 | gettext_noop ("tolerate COUNT number of continious timeout failures"), | 284 | gettext_noop ("create COUNT number of peers"), |
285 | GNUNET_YES, &GNUNET_GETOPT_set_uint, &num_cont_fails}, | 285 | &num_peers), |
286 | {'n', "non-interactive", NULL, | 286 | |
287 | gettext_noop ("run profiler in non-interactive mode where upon " | 287 | GNUNET_GETOPT_OPTION_SET_UINT ('e', |
288 | "testbed setup the profiler does not wait for a " | 288 | "num-errors", |
289 | "keystroke but continues to run until a termination " | 289 | "COUNT", |
290 | "signal is received"), | 290 | gettext_noop ("tolerate COUNT number of continious timeout failures"), |
291 | GNUNET_NO, &GNUNET_GETOPT_set_one, &noninteractive}, | 291 | &num_cont_fails), |
292 | |||
293 | GNUNET_GETOPT_OPTION_SET_ONE ('n', | ||
294 | "non-interactive", | ||
295 | gettext_noop ("run profiler in non-interactive mode where upon " | ||
296 | "testbed setup the profiler does not wait for a " | ||
297 | "keystroke but continues to run until a termination " | ||
298 | "signal is received"), | ||
299 | &noninteractive), | ||
300 | |||
292 | #if !ENABLE_SUPERMUC | 301 | #if !ENABLE_SUPERMUC |
293 | {'H', "hosts", "FILENAME", | 302 | GNUNET_GETOPT_OPTION_STRING ('H', |
294 | gettext_noop ("name of the file with the login information for the testbed"), | 303 | "hosts", |
295 | GNUNET_YES, &GNUNET_GETOPT_set_string, &hosts_file}, | 304 | "FILENAME", |
305 | gettext_noop ("name of the file with the login information for the testbed"), | ||
306 | &hosts_file), | ||
296 | #endif | 307 | #endif |
297 | GNUNET_GETOPT_OPTION_END | 308 | GNUNET_GETOPT_OPTION_END |
298 | }; | 309 | }; |