From d878cbfd4421020fbf8b798614172b168d5a6e09 Mon Sep 17 00:00:00 2001 From: Philippe Proulx Date: Mon, 25 Sep 2017 15:44:47 -0400 Subject: [PATCH] cli: put the project's version on the first line with no args. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- cli/babeltrace-cfg-cli-args.c | 2 ++ 1 file changed, 2 insertions(+) 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; } -- 2.34.1