cli: set `bt_config::command_name` field for all commands
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Mon, 4 Nov 2019 20:28:38 +0000 (15:28 -0500)
committerFrancis Deslauriers <francis.deslauriers@efficios.com>
Mon, 4 Nov 2019 23:34:37 +0000 (18:34 -0500)
This field is used in babeltrace2.c to print the pretty print the
command name in different logging messages.

Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Change-Id: I953ea162a33212157236be5295183e39fb866ff4
Reviewed-on: https://review.lttng.org/c/babeltrace/+/2331
Reviewed-by: Simon Marchi <simon.marchi@efficios.com>
Tested-by: jenkins <jenkins@lttng.org>
src/cli/babeltrace2-cfg-cli-args.c

index 57ccabf3713ae24a914409b0f9234ca22e1c6d6b..f0c64a3f18e8a7b67aad05d129ae6a87d5f2b16d 100644 (file)
@@ -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
This page took 0.025947 seconds and 4 git commands to generate.