[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120822084301.17293.90649.stgit@ltc189.sdl.hitachi.co.jp>
Date: Wed, 22 Aug 2012 17:43:02 +0900
From: Yoshihiro YUNOMAE <yoshihiro.yunomae.ez@...achi.com>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: Amit Shah <amit.shah@...hat.com>,
Anthony Liguori <anthony@...emonkey.ws>,
Arnd Bergmann <arnd@...db.de>, Borislav Petkov <bp@...64.org>,
"Franch Ch. Eigler" <fche@...hat.com>,
Frederic Weisbecker <fweisbec@...il.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Herbert Xu <herbert@...dor.apana.org.au>,
Ingo Molnar <mingo@...hat.com>,
Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Rusty Russell <rusty@...tcorp.com.au>,
linux-kernel@...r.kernel.org,
virtualization@...ts.linux-foundation.org, qemu-devel@...gnu.org,
yrl.pp-manager.tt@...achi.com,
Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
Yoshihiro YUNOMAE <yoshihiro.yunomae.ez@...achi.com>
Subject: [PATCH 1/5] trace-cmd: Use TRACE_DIR envrionment variable if defined
From: Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
Use TRACE_DIR environment variable for setting
debugfs/tracing directory if defined. This is
for controlling guest(or remote) ftrace.
Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
Signed-off-by: Yoshihiro YUNOMAE <yoshihiro.yunomae.ez@...achi.com>
---
trace-util.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/trace-util.c b/trace-util.c
index e128188..d5a3eb4 100644
--- a/trace-util.c
+++ b/trace-util.c
@@ -311,6 +311,15 @@ char *tracecmd_find_tracing_dir(void)
char type[100];
FILE *fp;
+ tracing_dir = getenv("TRACE_DIR");
+ if (tracing_dir) {
+ tracing_dir = strdup(tracing_dir);
+ if (!tracing_dir)
+ die("malloc");
+ warning("Use environmental tracing directory: %s\n", tracing_dir);
+ return tracing_dir;
+ }
+
if ((fp = fopen("/proc/mounts","r")) == NULL) {
warning("Can't open /proc/mounts for read");
return NULL;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists