tools lib api: The tracing_mnt variable doesn't need to be global
tip-bot for Arnaldo Carvalho de Melo
merge botCommit-ID: 00a6270361c025bfaae1d70ef1b596d182e05e8a Gitweb: https://git.kernel.org/tip/00a6270361c025bfaae1d70ef1b596d182e05e8a Author: Arnaldo Carvalho de Melo <[email protected]> AuthorDate: Wed, 16 May 2018 16:20:12 -0300 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Wed, 16 May 2018 16:20:12 -0300
tools lib api: The tracing_mnt variable doesn't need to be global
Its only used in the file it is defined, so just make it static.
Cc Adrian Hunter <[email protected]>
Cc David Ahern <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Wang Nan <[email protected]>
Signed-off-by Arnaldo Carvalho de Melo <[email protected]>
--- tools/lib/api/fs/tracing_path.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
tools/lib/api/fs/tracing_path.c +2 -3
@@ -13,8 +13,7 @@#include "tracing_path.h" - -char tracing_mnt[PATH_MAX ] ="/sys/kernel/debug" ; +static char tracing_mnt[PATH_MAX ] ="/sys/kernel/debug" ;char tracing_path[PATH_MAX ] ="/sys/kernel/debug/tracing" ;char tracing_events_path[PATH_MAX ] ="/sys/kernel/debug/tracing/events" ;
@@ -129,7 +128,7 @@ int tracing_path__strerror_open_tp(int err, char *buf, size_t size,snprintf (buf, size,"Error:\tNo permissions to read %s/%s\n" "Hint:\tTry 'sudo mount -o remount,mode=755 %s'\n" , - tracing_events_path, filename, tracing_mnt); + tracing_events_path, filename,tracing_path_mount ()); }break ;default :