sink.text.details: validate parameters using param-validation
authorSimon Marchi <simon.marchi@efficios.com>
Mon, 7 Oct 2019 19:21:14 +0000 (15:21 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 17 Oct 2019 16:13:26 +0000 (12:13 -0400)
commitbaa5e3aa82a82c9d0fa59e3c586c0168bb5dc267
tree9ffdfeb5c90db546ed3d7c15a2bba8000f83e4a0
parentaf9f8da7ba4a9b16fc36d637b8c3a0c7a8774da2
sink.text.details: validate parameters using param-validation

This patch makes sink.text.details validate its parameters using the
param-validation utility, instead of doing it by hand.

To be able to re-use the parameter names in the statically defined
array, I had to change them to macros, to avoid this warning:

/home/smarchi/src/babeltrace/src/plugins/text/details/details.c:244:4: error: initializer element is not constant
  { color_param_name, BT_PARAM_VALIDATION_MAP_VALUE_ENTRY_OPTIONAL, { BT_VALUE_TYPE_STRING, .string = {
    ^~~~~~~~~~~~~~~~

Change-Id: I4279348e8441c22afe1ae47a6650d0a118cfa42a
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/2146
Tested-by: jenkins <jenkins@lttng.org>
src/plugins/text/Makefile.am
src/plugins/text/details/details.c
This page took 0.024247 seconds and 4 git commands to generate.