From: Philippe Proulx Date: Mon, 25 Sep 2017 19:44:47 +0000 (-0400) Subject: cli: put the project's version on the first line with no args. X-Git-Url: http://git.efficios.com/?a=commitdiff_plain;h=d878cbfd4421020fbf8b798614172b168d5a6e09;p=babeltrace.git cli: put the project's version on the first line with no args. This is to ensure backward compatibility with Babeltrace 1.x, especially for the LTTng analyses project which check the Babeltrace's version this way because of a missing --version option. Reported-by: Michael Jeanson Signed-off-by: Philippe Proulx Signed-off-by: Jérémie Galarneau --- diff --git a/cli/babeltrace-cfg-cli-args.c b/cli/babeltrace-cfg-cli-args.c index ad83e4c3..293b0fe4 100644 --- a/cli/babeltrace-cfg-cli-args.c +++ b/cli/babeltrace-cfg-cli-args.c @@ -4842,6 +4842,8 @@ struct bt_config *bt_config_cli_args_create(int argc, const char *argv[], } if (argc <= 1) { + print_version(); + puts(""); print_gen_usage(stdout); goto end; }