diff options
author | Steven Rostedt <srostedt@redhat.com> | 2015-03-24 16:57:54 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-03-24 18:20:09 +0300 |
commit | 5dbcfd930e430b33fb4dfded9c1af0cf432772b9 (patch) | |
tree | 0c516ffb080868cad9ef075eee62934be2219be7 /tools/lib/traceevent/event-parse.h | |
parent | 2771984c7f5e6cab812e86ec152da4fb5f6df908 (diff) | |
download | linux-5dbcfd930e430b33fb4dfded9c1af0cf432772b9.tar.xz |
tools lib traceevent: Make plugin options either string or boolean
When a plugin option is defined, by default it is a boolean (true or false).
If the option is something else, then it needs to set its "value" field to
a default string other than NULL (can be just "").
If the value is not set then the option is considered boolean, and the
updating of the option value will be handled accordingly.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/r/20150324135923.308372986@goodmis.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/lib/traceevent/event-parse.h')
-rw-r--r-- | tools/lib/traceevent/event-parse.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/lib/traceevent/event-parse.h b/tools/lib/traceevent/event-parse.h index 8bd7c6a4cbd7..8ca1b8ee50da 100644 --- a/tools/lib/traceevent/event-parse.h +++ b/tools/lib/traceevent/event-parse.h @@ -116,7 +116,7 @@ struct pevent_plugin_option { char *name; char *plugin_alias; char *description; - char *value; + const char *value; void *priv; int set; }; @@ -154,6 +154,10 @@ struct pevent_plugin_option { * .plugin_alias is used to give a shorter name to access * the vairable. Useful if a plugin handles more than one event. * + * If .value is not set, then it is considered a boolean and only + * .set will be processed. If .value is defined, then it is considered + * a string option and .set will be ignored. + * * PEVENT_PLUGIN_ALIAS: (optional) * The name to use for finding options (uses filename if not defined) */ |