X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Fversion.c;h=f0b63a452b56291c962ab32ebfe49d6a9f7cc4b9;hb=ce6877c939c5530e919011f7e34fe14f3d1fc090;hp=3630950bbcd0eb63b47f99fd86f2e13318f634d6;hpb=4ba92f185fb1d0b112cbc804a261939f5f81dc34;p=lttng-tools.git diff --git a/src/bin/lttng/commands/version.c b/src/bin/lttng/commands/version.c index 3630950bb..f0b63a452 100644 --- a/src/bin/lttng/commands/version.c +++ b/src/bin/lttng/commands/version.c @@ -27,6 +27,13 @@ #include #include "../command.h" +#include "version.h" + +#ifdef LTTNG_EMBED_HELP +static const char help_msg[] = +#include +; +#endif enum { OPT_HELP = 1, @@ -42,19 +49,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 */ @@ -154,7 +148,6 @@ int cmd_version(int argc, const char **argv) list_cmd_options(stdout, long_options); goto end; default: - usage(stderr); ret = CMD_UNDEFINED; goto end; }