From 04439d6577dddc7453ff951bf90dc181c70af39d Mon Sep 17 00:00:00 2001 From: Francis Deslauriers Date: Mon, 4 Nov 2019 15:28:38 -0500 Subject: [PATCH] cli: set `bt_config::command_name` field for all commands This field is used in babeltrace2.c to print the pretty print the command name in different logging messages. Signed-off-by: Francis Deslauriers Change-Id: I953ea162a33212157236be5295183e39fb866ff4 Reviewed-on: https://review.lttng.org/c/babeltrace/+/2331 Reviewed-by: Simon Marchi Tested-by: jenkins --- src/cli/babeltrace2-cfg-cli-args.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/cli/babeltrace2-cfg-cli-args.c b/src/cli/babeltrace2-cfg-cli-args.c index 57ccabf3..f0c64a3f 100644 --- a/src/cli/babeltrace2-cfg-cli-args.c +++ b/src/cli/babeltrace2-cfg-cli-args.c @@ -4613,14 +4613,19 @@ struct bt_config *bt_config_cli_args_create(int argc, const char *argv[], if (strcmp(item_non_opt->arg, "convert") == 0) { command_type = COMMAND_TYPE_CONVERT; + command_name = "convert"; } else if (strcmp(item_non_opt->arg, "list-plugins") == 0) { command_type = COMMAND_TYPE_LIST_PLUGINS; + command_name = "list-plugins"; } else if (strcmp(item_non_opt->arg, "help") == 0) { command_type = COMMAND_TYPE_HELP; + command_name = "help"; } else if (strcmp(item_non_opt->arg, "query") == 0) { command_type = COMMAND_TYPE_QUERY; + command_name = "query"; } else if (strcmp(item_non_opt->arg, "run") == 0) { command_type = COMMAND_TYPE_RUN; + command_name = "run"; } else { /* * Non-option argument, but not a known -- 2.34.1