X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Fversion.c;h=5264872b89f7d17abcefbe7969f565fa6e639b84;hb=8ff7624a471a53c1461e6c327ab62ef703feb174;hp=7634f5871a0eaec92e7a4820e36e21c487905aa1;hpb=890d8fe47755c3bad936389cf48ffa141cff41c9;p=lttng-tools.git diff --git a/src/bin/lttng/commands/version.c b/src/bin/lttng/commands/version.c index 7634f5871..5264872b8 100644 --- a/src/bin/lttng/commands/version.c +++ b/src/bin/lttng/commands/version.c @@ -42,19 +42,6 @@ static struct poptOption long_options[] = { {0, 0, 0, 0, 0, 0, 0} }; -/* - * usage - */ -static void usage(FILE *ofp) -{ - fprintf(ofp, "usage: lttng version [OPTIONS]\n"); - fprintf(ofp, "\n"); - fprintf(ofp, "Options:\n"); - fprintf(ofp, " -h, --help Show this help\n"); - fprintf(ofp, " --list-options Simple listing of options\n"); - fprintf(ofp, "\n"); -} - /* * create_version */ @@ -148,13 +135,12 @@ int cmd_version(int argc, const char **argv) while ((opt = poptGetNextOpt(pc)) != -1) { switch (opt) { case OPT_HELP: - usage(stdout); + SHOW_HELP(); goto end; case OPT_LIST_OPTIONS: list_cmd_options(stdout, long_options); goto end; default: - usage(stderr); ret = CMD_UNDEFINED; goto end; } @@ -168,6 +154,12 @@ int cmd_version(int argc, const char **argv) MSG("\n" VERSION_DESCRIPTION "\n"); MSG("Web site: http://lttng.org"); MSG("\n%s", lttng_license); + if (EXTRA_VERSION_NAME[0] != '\0') { + MSG("\nExtra version name: " EXTRA_VERSION_NAME); + } + if (EXTRA_VERSION_DESCRIPTION[0] != '\0') { + MSG("\nExtra version description:\n\t" EXTRA_VERSION_DESCRIPTION); + } } end: