diff --git a/src/hook.c b/src/hook.c index 93e3426ab..b98ab9a80 100644 --- a/src/hook.c +++ b/src/hook.c @@ -84,8 +84,7 @@ static void usage() printf(" -d LVL set debug level to LVL\n"); printf(" -v CNT process CNT smps at once\n"); printf(" -h show this help\n"); - printf(" -V show the version of the tool\n"); - printf("\n"); + printf(" -V show the version of the tool\n\n"); printf("The following hook functions are supported:\n"); plugin_dump(PLUGIN_TYPE_HOOK); diff --git a/src/node.c b/src/node.c index 2d264160c..f864dc5cc 100644 --- a/src/node.c +++ b/src/node.c @@ -68,8 +68,8 @@ static void usage() { printf("Usage: villas-node [OPTIONS] [CONFIG]\n"); printf(" OPTIONS is one or more of the following options:\n"); - printf(" -V show the version of the tool\n"); - printf(" -h show this help\n"); + printf(" -h show this usage information\n"); + printf(" -V show the version of the tool\n\n"); printf(" CONFIG is the path to an optional configuration file\n"); printf(" if omitted, VILLASnode will start without a configuration\n"); printf(" and wait for provisioning over the web interface.\n\n"); diff --git a/src/pipe.c b/src/pipe.c index b08a41e6f..75b5d8435 100644 --- a/src/pipe.c +++ b/src/pipe.c @@ -99,6 +99,7 @@ static void usage() printf(" -t NUM terminate after NUM seconds\n"); printf(" -L NUM terminate after NUM samples sent\n"); printf(" -l NUM terminate after NUM samples received\n"); + printf(" -h show this usage information\n"); printf(" -V show the version of the tool\n\n"); print_copyright(); diff --git a/src/test-cmp.c b/src/test-cmp.c index b7f6cb9eb..89b5a1fe5 100644 --- a/src/test-cmp.c +++ b/src/test-cmp.c @@ -48,14 +48,15 @@ void usage() printf("Usage: villas-test-cmp [OPTIONS] FILE1 FILE2 ... FILEn\n"); printf(" FILE a list of files to compare\n"); printf(" OPTIONS is one or more of the following options:\n"); - printf(" -h print this usage information\n"); printf(" -d LVL adjust the debug level\n"); printf(" -e EPS set epsilon for floating point comparisons to EPS\n"); printf(" -v ignore data values\n"); printf(" -t ignore timestamp\n"); printf(" -s ignore sequence no\n"); printf(" -f FMT file format for all files\n"); - printf("\n"); + printf(" -h show this usage information\n"); + printf(" -V show the version of the tool\n\n"); + printf("Return codes:\n"); printf(" 0 files are equal\n"); printf(" 1 file length not equal\n"); @@ -81,7 +82,7 @@ int main(int argc, char *argv[]) /* Parse Arguments */ char c, *endptr; - while ((c = getopt (argc, argv, "he:vtsf:")) != -1) { + while ((c = getopt (argc, argv, "he:vtsf:V")) != -1) { switch (c) { case 'e': epsilon = strtod(optarg, &endptr); @@ -98,6 +99,9 @@ int main(int argc, char *argv[]) case 'f': format = optarg; break; + case 'V': + print_version(); + exit(EXIT_SUCCESS); case 'h': case '?': usage(); diff --git a/src/test-rtt.c b/src/test-rtt.c index ae5532220..051be9ed9 100644 --- a/src/test-rtt.c +++ b/src/test-rtt.c @@ -75,6 +75,7 @@ void usage() printf(" -b BKTS number of buckets for histogram\n"); printf(" -w WMUP duration of histogram warmup phase\n"); printf(" -h show this usage information\n"); + printf(" -V show the version of the tool\n\n"); printf("\n"); print_copyright(); @@ -84,7 +85,7 @@ int main(int argc, char *argv[]) { /* Parse Arguments */ char c, *endptr; - while ((c = getopt (argc, argv, "w:h:r:f:c:b:")) != -1) { + while ((c = getopt (argc, argv, "w:h:r:f:c:b:V")) != -1) { switch (c) { case 'c': count = strtoul(optarg, &endptr, 10); @@ -98,6 +99,9 @@ int main(int argc, char *argv[]) case 'b': hist_buckets = strtoul(optarg, &endptr, 10); goto check; + case 'V': + print_version(); + exit(EXIT_SUCCESS); case 'h': case '?': usage();