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)
commit6375b9429f8332f3eacc2ec795aa1924c73d9cc8
treece0cac5c58d794f8b2e085d2d504af79f26f4b3c
parentdbc37715597584e302c55ed61b95562db95df9ac
common: move bt_component_class_type_string here, use it more

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>
src/cli/babeltrace2.c
src/common/common.h
src/lib/graph/component-class.c
src/lib/graph/component-class.h
src/lib/lib-logging.c
src/lib/plugin/plugin-so.c
src/python-plugin-provider/python-plugin-provider.c
tests/cli/query/test_query
tests/cli/test_help
This page took 0.026436 seconds and 4 git commands to generate.