aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lib
diff options
context:
space:
mode:
authorTzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>2018-09-19 14:56:56 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2018-09-19 16:29:26 -0400
commit785be0c98d24aaf417588322c74999520ea790a4 (patch)
tree53382dc3243b55fbd3bd2f62f97f5f8c3473f3b3 /tools/lib
parent9334c9616b71202c751a12edf5f83f51ec5a1663 (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.h8
-rw-r--r--tools/lib/traceevent/event-plugin.c18
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
392struct plugin_list; 392struct 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
396struct plugin_list *tep_load_plugins(struct tep_handle *pevent); 396struct tep_plugin_list *tep_load_plugins(struct tep_handle *pevent);
397void tep_unload_plugins(struct plugin_list *plugin_list, 397void tep_unload_plugins(struct tep_plugin_list *plugin_list,
398 struct tep_handle *pevent); 398 struct tep_handle *pevent);
399char **tep_plugin_list_options(void); 399char **tep_plugin_list_options(void);
400void tep_plugin_free_options_list(char **list); 400void tep_plugin_free_options_list(char **list);
@@ -403,7 +403,7 @@ int tep_plugin_add_options(const char *name,
403void tep_plugin_remove_options(struct tep_plugin_option *options); 403void tep_plugin_remove_options(struct tep_plugin_option *options);
404void tep_print_plugins(struct trace_seq *s, 404void 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
408struct cmdline; 408struct cmdline;
409struct cmdline_list; 409struct 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
34struct plugin_list { 34struct 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 */
260void tep_print_plugins(struct trace_seq *s, 260void 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
271load_plugin(struct tep_handle *pevent, const char *path, 271load_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
420struct plugin_list* 420struct tep_plugin_list*
421tep_load_plugins(struct tep_handle *pevent) 421tep_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
429void 429void
430tep_unload_plugins(struct plugin_list *plugin_list, struct tep_handle *pevent) 430tep_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;