[PATCH 08/11] perf tools: Do not export debugfs_mountpoint and tracefs_mountpoint

From: Jiri Olsa
Date: Wed Aug 26 2015 - 09:48:22 EST


Both debugfs_mountpoint and tracefs_mountpoint should not be changed
externally. Both mounpoints are returned by following interface:

debugfs_find_mountpoint
tracefs_find_mountpoint

Link: http://lkml.kernel.org/n/tip-ptrbv90c13ebticnfu1ysye7@xxxxxxxxxxxxxx
Signed-off-by: Jiri Olsa <jolsa@xxxxxxxxxx>
---
tools/lib/api/fs/debugfs.c | 2 +-
tools/lib/api/fs/debugfs.h | 2 --
tools/lib/api/fs/tracefs.c | 2 +-
tools/lib/api/fs/tracefs.h | 2 --
4 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/tools/lib/api/fs/debugfs.c b/tools/lib/api/fs/debugfs.c
index 896c3595c9df..9e7e039a99ae 100644
--- a/tools/lib/api/fs/debugfs.c
+++ b/tools/lib/api/fs/debugfs.c
@@ -18,7 +18,7 @@
#define DEBUGFS_DEFAULT_PATH "/sys/kernel/debug"
#endif

-char debugfs_mountpoint[PATH_MAX + 1] = DEBUGFS_DEFAULT_PATH;
+static char debugfs_mountpoint[PATH_MAX + 1] = DEBUGFS_DEFAULT_PATH;

static const char * const debugfs_known_mountpoints[] = {
DEBUGFS_DEFAULT_PATH,
diff --git a/tools/lib/api/fs/debugfs.h b/tools/lib/api/fs/debugfs.h
index 19a618e9dbc1..0eb57ecbbb5f 100644
--- a/tools/lib/api/fs/debugfs.h
+++ b/tools/lib/api/fs/debugfs.h
@@ -15,6 +15,4 @@ bool debugfs_configured(void);
const char *debugfs_find_mountpoint(void);
char *debugfs_mount(const char *mountpoint);

-extern char debugfs_mountpoint[];
-
#endif /* __API_DEBUGFS_H__ */
diff --git a/tools/lib/api/fs/tracefs.c b/tools/lib/api/fs/tracefs.c
index e4aa9688b71e..b5d34ee3cddc 100644
--- a/tools/lib/api/fs/tracefs.c
+++ b/tools/lib/api/fs/tracefs.c
@@ -16,7 +16,7 @@
#define TRACEFS_DEFAULT_PATH "/sys/kernel/tracing"
#endif

-char tracefs_mountpoint[PATH_MAX + 1] = TRACEFS_DEFAULT_PATH;
+static char tracefs_mountpoint[PATH_MAX + 1] = TRACEFS_DEFAULT_PATH;

static const char * const tracefs_known_mountpoints[] = {
TRACEFS_DEFAULT_PATH,
diff --git a/tools/lib/api/fs/tracefs.h b/tools/lib/api/fs/tracefs.h
index da780ac49acb..be7d4c543de5 100644
--- a/tools/lib/api/fs/tracefs.h
+++ b/tools/lib/api/fs/tracefs.h
@@ -16,6 +16,4 @@ const char *tracefs_find_mountpoint(void);
int tracefs_valid_mountpoint(const char *debugfs);
char *tracefs_mount(const char *mountpoint);

-extern char tracefs_mountpoint[];
-
#endif /* __API_DEBUGFS_H__ */
--
2.4.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/