diff options
author | Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com> | 2018-08-08 14:03:07 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2018-08-13 15:35:58 -0300 |
commit | 1634e4604cccbe6394dd858fb973604d2313336b (patch) | |
tree | 90881766a5c96224892fb7e48051cc58c4619c13 /tools/lib/traceevent/parse-filter.c | |
parent | 413af01c8d9d5d688df3244401cbddfe98bafe2a (diff) | |
download | linux-1634e4604cccbe6394dd858fb973604d2313336b.tar.bz2 |
tools lib traceevent: Rename internal parser related APIs
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_" and not "pevent_". This changes
APIs: pevent_buffer_init, pevent_read_token, pevent_free_token,
pevent_peek_char, pevent_get_input_buf, pevent_get_input_buf_ptr
Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Yordan Karadzhov (VMware) <y.karadz@gmail.com>
Cc: linux-trace-devel@vger.kernel.org
Link: http://lkml.kernel.org/r/20180808180703.275281085@goodmis.org
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/lib/traceevent/parse-filter.c')
-rw-r--r-- | tools/lib/traceevent/parse-filter.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tools/lib/traceevent/parse-filter.c b/tools/lib/traceevent/parse-filter.c index 3efab9b4298f..5e3f29736a25 100644 --- a/tools/lib/traceevent/parse-filter.c +++ b/tools/lib/traceevent/parse-filter.c @@ -51,8 +51,8 @@ static void show_error(char *error_buf, const char *fmt, ...) int len; int i; - input = pevent_get_input_buf(); - index = pevent_get_input_buf_ptr(); + input = tep_get_input_buf(); + index = tep_get_input_buf_ptr(); len = input ? strlen(input) : 0; if (len) { @@ -72,7 +72,7 @@ static void show_error(char *error_buf, const char *fmt, ...) static void free_token(char *token) { - pevent_free_token(token); + tep_free_token(token); } static enum event_type read_token(char **tok) @@ -82,13 +82,13 @@ static enum event_type read_token(char **tok) do { free_token(token); - type = pevent_read_token(&token); + type = tep_read_token(&token); } while (type == EVENT_NEWLINE || type == EVENT_SPACE); /* If token is = or ! check to see if the next char is ~ */ if (token && (strcmp(token, "=") == 0 || strcmp(token, "!") == 0) && - pevent_peek_char() == '~') { + tep_peek_char() == '~') { /* append it */ *tok = malloc(3); if (*tok == NULL) { @@ -98,7 +98,7 @@ static enum event_type read_token(char **tok) sprintf(*tok, "%c%c", *token, '~'); free_token(token); /* Now remove the '~' from the buffer */ - pevent_read_token(&token); + tep_read_token(&token); free_token(token); } else *tok = token; @@ -1198,7 +1198,7 @@ process_event(struct event_format *event, const char *filter_str, { int ret; - pevent_buffer_init(filter_str, strlen(filter_str)); + tep_buffer_init(filter_str, strlen(filter_str)); ret = process_filter(event, parg, error_str, 0); if (ret < 0) @@ -1254,7 +1254,7 @@ filter_event(struct event_filter *filter, struct event_format *event, static void filter_init_error_buf(struct event_filter *filter) { /* clear buffer to reset show error */ - pevent_buffer_init("", 0); + tep_buffer_init("", 0); filter->error_buffer[0] = '\0'; } |