diff options
author | Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com> | 2018-09-19 14:56:56 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2018-09-19 16:29:26 -0400 |
commit | 785be0c98d24aaf417588322c74999520ea790a4 (patch) | |
tree | 53382dc3243b55fbd3bd2f62f97f5f8c3473f3b3 /tools/lib | |
parent | 9334c9616b71202c751a12edf5f83f51ec5a1663 (diff) |
tools lib traceevent: Rename struct plugin_list to struct tep_plugin_list
In order to make libtraceevent into a proper library, variables, data
structures and functions require a unique prefix to prevent name space
conflicts. That prefix will be "tep_". This renames struct plugin_list
to struct tep_plugin_list
Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
Cc: linux-trace-devel@vger.kernel.org
Link: http://lkml.kernel.org/r/20180919185724.586889128@goodmis.org
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/lib')
-rw-r--r-- | tools/lib/traceevent/event-parse.h | 8 | ||||
-rw-r--r-- | tools/lib/traceevent/event-plugin.c | 18 |
2 files changed, 13 insertions, 13 deletions
diff --git a/tools/lib/traceevent/event-parse.h b/tools/lib/traceevent/event-parse.h index 1abf15882460..2a7b0a857f39 100644 --- a/tools/lib/traceevent/event-parse.h +++ b/tools/lib/traceevent/event-parse.h | |||
@@ -389,12 +389,12 @@ enum tep_errno { | |||
389 | }; | 389 | }; |
390 | #undef _PE | 390 | #undef _PE |
391 | 391 | ||
392 | struct plugin_list; | 392 | struct tep_plugin_list; |
393 | 393 | ||
394 | #define INVALID_PLUGIN_LIST_OPTION ((char **)((unsigned long)-1)) | 394 | #define INVALID_PLUGIN_LIST_OPTION ((char **)((unsigned long)-1)) |
395 | 395 | ||
396 | struct plugin_list *tep_load_plugins(struct tep_handle *pevent); | 396 | struct tep_plugin_list *tep_load_plugins(struct tep_handle *pevent); |
397 | void tep_unload_plugins(struct plugin_list *plugin_list, | 397 | void tep_unload_plugins(struct tep_plugin_list *plugin_list, |
398 | struct tep_handle *pevent); | 398 | struct tep_handle *pevent); |
399 | char **tep_plugin_list_options(void); | 399 | char **tep_plugin_list_options(void); |
400 | void tep_plugin_free_options_list(char **list); | 400 | void tep_plugin_free_options_list(char **list); |
@@ -403,7 +403,7 @@ int tep_plugin_add_options(const char *name, | |||
403 | void tep_plugin_remove_options(struct tep_plugin_option *options); | 403 | void tep_plugin_remove_options(struct tep_plugin_option *options); |
404 | void tep_print_plugins(struct trace_seq *s, | 404 | void tep_print_plugins(struct trace_seq *s, |
405 | const char *prefix, const char *suffix, | 405 | const char *prefix, const char *suffix, |
406 | const struct plugin_list *list); | 406 | const struct tep_plugin_list *list); |
407 | 407 | ||
408 | struct cmdline; | 408 | struct cmdline; |
409 | struct cmdline_list; | 409 | struct cmdline_list; |
diff --git a/tools/lib/traceevent/event-plugin.c b/tools/lib/traceevent/event-plugin.c index ec16a103c0cc..46eb64eb0c2e 100644 --- a/tools/lib/traceevent/event-plugin.c +++ b/tools/lib/traceevent/event-plugin.c | |||
@@ -31,8 +31,8 @@ static struct trace_plugin_options { | |||
31 | char *value; | 31 | char *value; |
32 | } *trace_plugin_options; | 32 | } *trace_plugin_options; |
33 | 33 | ||
34 | struct plugin_list { | 34 | struct tep_plugin_list { |
35 | struct plugin_list *next; | 35 | struct tep_plugin_list *next; |
36 | char *name; | 36 | char *name; |
37 | void *handle; | 37 | void *handle; |
38 | }; | 38 | }; |
@@ -259,7 +259,7 @@ void tep_plugin_remove_options(struct tep_plugin_option *options) | |||
259 | */ | 259 | */ |
260 | void tep_print_plugins(struct trace_seq *s, | 260 | void tep_print_plugins(struct trace_seq *s, |
261 | const char *prefix, const char *suffix, | 261 | const char *prefix, const char *suffix, |
262 | const struct plugin_list *list) | 262 | const struct tep_plugin_list *list) |
263 | { | 263 | { |
264 | while (list) { | 264 | while (list) { |
265 | trace_seq_printf(s, "%s%s%s", prefix, list->name, suffix); | 265 | trace_seq_printf(s, "%s%s%s", prefix, list->name, suffix); |
@@ -271,9 +271,9 @@ static void | |||
271 | load_plugin(struct tep_handle *pevent, const char *path, | 271 | load_plugin(struct tep_handle *pevent, const char *path, |
272 | const char *file, void *data) | 272 | const char *file, void *data) |
273 | { | 273 | { |
274 | struct plugin_list **plugin_list = data; | 274 | struct tep_plugin_list **plugin_list = data; |
275 | tep_plugin_load_func func; | 275 | tep_plugin_load_func func; |
276 | struct plugin_list *list; | 276 | struct tep_plugin_list *list; |
277 | const char *alias; | 277 | const char *alias; |
278 | char *plugin; | 278 | char *plugin; |
279 | void *handle; | 279 | void *handle; |
@@ -417,20 +417,20 @@ load_plugins(struct tep_handle *pevent, const char *suffix, | |||
417 | free(path); | 417 | free(path); |
418 | } | 418 | } |
419 | 419 | ||
420 | struct plugin_list* | 420 | struct tep_plugin_list* |
421 | tep_load_plugins(struct tep_handle *pevent) | 421 | tep_load_plugins(struct tep_handle *pevent) |
422 | { | 422 | { |
423 | struct plugin_list *list = NULL; | 423 | struct tep_plugin_list *list = NULL; |
424 | 424 | ||
425 | load_plugins(pevent, ".so", load_plugin, &list); | 425 | load_plugins(pevent, ".so", load_plugin, &list); |
426 | return list; | 426 | return list; |
427 | } | 427 | } |
428 | 428 | ||
429 | void | 429 | void |
430 | tep_unload_plugins(struct plugin_list *plugin_list, struct tep_handle *pevent) | 430 | tep_unload_plugins(struct tep_plugin_list *plugin_list, struct tep_handle *pevent) |
431 | { | 431 | { |
432 | tep_plugin_unload_func func; | 432 | tep_plugin_unload_func func; |
433 | struct plugin_list *list; | 433 | struct tep_plugin_list *list; |
434 | 434 | ||
435 | while (plugin_list) { | 435 | while (plugin_list) { |
436 | list = plugin_list; | 436 | list = plugin_list; |