common: move bt_component_class_type_string here, use it more
authorSimon Marchi <simon.marchi@efficios.com>
Fri, 10 Sep 2021 03:25:19 +0000 (23:25 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 10 Sep 2021 11:43:37 +0000 (07:43 -0400)
I spotted some messages in the CLI code that could print the component
class type as a string rather than an integer.
bt_component_class_type_string is not accessible to the CLI code,
because it's in a lib header.  Move it to common/common.h, and rename it
accordingly.

Adjust all existing callers, and use it in cli/babeltrace2.c.

Before:

    $ ./src/cli/babeltrace2 query src.ctf.fs foo
    ...
    Failed to query component class: unknown query object: plugin-name="ctf", comp-cls-name="fs", comp-cls-type=1 object="foo"

After:

    $ ./src/cli/babeltrace2 query src.ctf.fs foo
    ...
    Failed to query component class: unknown query object: plugin-name="ctf", comp-cls-name="fs", comp-cls-type=SOURCE object="foo"

Change-Id: I88f01ac7cae9723ce11dbf2ec0843a06d761abb6
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/6273
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>

No differences found
This page took 0.024681 seconds and 4 git commands to generate.