diff mbox series

[12/13,v2] libtracefs: Move struct tracefs_instance to tracefs-local.h

Message ID 20210330005248.979418078@goodmis.org (mailing list archive)
State Accepted
Commit 78babbffe37bfd1461090e7be5901103f11f2048
Headers show
Series libtracefs: Add tracefs_function_filter() | expand

Commit Message

Steven Rostedt March 30, 2021, 12:51 a.m. UTC
From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>

In order to have direct access to the tracefs_instance structure for all
of the libtracefs internal code, move it to the tracefs-local.h file, then
other parts of libtracefs code can use it to store internal data.

Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
 include/tracefs-local.h | 6 ++++++
 src/tracefs-instance.c  | 5 -----
 2 files changed, 6 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/include/tracefs-local.h b/include/tracefs-local.h
index 187870e7c491..9c18218cd916 100644
--- a/include/tracefs-local.h
+++ b/include/tracefs-local.h
@@ -14,6 +14,12 @@ 
 #define BUILD_BUG_ON(cond)			\
 	do { if (!(1/!(cond))) { } } while (0)
 
+struct tracefs_instance {
+	char	*trace_dir;
+	char	*name;
+	int	flags;
+};
+
 /* Can be overridden */
 void warning(const char *fmt, ...);
 
diff --git a/src/tracefs-instance.c b/src/tracefs-instance.c
index 0df313c8e8c6..a02c839f2079 100644
--- a/src/tracefs-instance.c
+++ b/src/tracefs-instance.c
@@ -19,11 +19,6 @@ 
 #include "tracefs-local.h"
 
 #define FLAG_INSTANCE_NEWLY_CREATED	(1 << 0)
-struct tracefs_instance {
-	char	*trace_dir;
-	char	*name;
-	int	flags;
-};
 
 /**
  * instance_alloc - allocate a new ftrace instance