diff mbox series

[2/5] trace-cmd library: Make tracecmd_filter_match() local

Message ID 20220922002940.3302285-3-rostedt@goodmis.org (mailing list archive)
State Accepted
Commit ee007a12a396ddbc0ee868940e8f90eb2daa720b
Headers show
Series trace-cmd library: Update the man pages | expand

Commit Message

Steven Rostedt Sept. 22, 2022, 12:29 a.m. UTC
From: "Steven Rostedt (Google)" <rostedt@goodmis.org>

The function tracecmd_filter_match() is really an internal function. It
should not be exported for other applications (The trace-cmd core
functions do not use it). It should definitely not be in the public
headers.

Move the prototype so that it is only used internally within the
library.

Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
 include/trace-cmd/trace-cmd.h           | 2 --
 lib/trace-cmd/include/trace-cmd-local.h | 3 +++
 lib/trace-cmd/trace-filter.c            | 4 ++--
 3 files changed, 5 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/include/trace-cmd/trace-cmd.h b/include/trace-cmd/trace-cmd.h
index 4963f45dfe12..331815b9edc2 100644
--- a/include/trace-cmd/trace-cmd.h
+++ b/include/trace-cmd/trace-cmd.h
@@ -76,7 +76,5 @@  enum tracecmd_filters {
 struct tracecmd_filter;
 struct tracecmd_filter *tracecmd_filter_add(struct tracecmd_input *handle,
 					    const char *filter_str, bool neg);
-enum tracecmd_filters tracecmd_filter_match(struct tracecmd_filter *filter,
-					    struct tep_record *record);
 
 #endif /* _TRACE_CMD_H */
diff --git a/lib/trace-cmd/include/trace-cmd-local.h b/lib/trace-cmd/include/trace-cmd-local.h
index 2a458133204b..c95ec6530fdd 100644
--- a/lib/trace-cmd/include/trace-cmd-local.h
+++ b/lib/trace-cmd/include/trace-cmd-local.h
@@ -49,6 +49,9 @@  struct data_file_write {
 	unsigned long long	file_data_offset;
 };
 
+enum tracecmd_filters tracecmd_filter_match(struct tracecmd_filter *filter,
+					    struct tep_record *record);
+
 void tracecmd_compress_init(void);
 void tracecmd_compress_free(void);
 
diff --git a/lib/trace-cmd/trace-filter.c b/lib/trace-cmd/trace-filter.c
index f7eb46c762d6..1c8c07fcf0da 100644
--- a/lib/trace-cmd/trace-filter.c
+++ b/lib/trace-cmd/trace-filter.c
@@ -44,8 +44,8 @@  static bool test_stacktraces(struct tracecmd_filter *filter, struct tep_record *
 		test_stacktrace(filter, record, filter->user_stacktrace_id);
 }
 
-enum tracecmd_filters tracecmd_filter_match(struct tracecmd_filter *filter,
-					    struct tep_record *record)
+__hidden enum tracecmd_filters tracecmd_filter_match(struct tracecmd_filter *filter,
+						     struct tep_record *record)
 {
 	bool found = false;
 	int ret;