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)
committerSimon Marchi <simon.marchi@efficios.com>
Fri, 11 Oct 2019 14:50:09 +0000 (10:50 -0400)
commit48a0e52c4632a60cd43423f2f34f10de350bf868
treeafc139b29ad387476020850a03115bf88095ebbd
parentcf7b259eaa602abcef308d2b5dd8e6c9ee995d8b
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.024643 seconds and 4 git commands to generate.