From: David Sharp <dhsharp@google.com>
To: rostedt@goodmis.org
Cc: linux-kernel@vger.kernel.org, mrubin@google.com,
David Sharp <dhsharp@google.com>
Subject: [PATCH] trace-cmd: Search $TRACE_CMD_PLUGIN_DIR for plugins.
Date: Tue, 28 Sep 2010 17:00:16 -0700 [thread overview]
Message-ID: <1285718416-1470-1-git-send-email-dhsharp@google.com> (raw)
Allows dynamic specification of the plugin directory so that plugins can be
used when the install prefix cannot be predicted, such as when using a
pre-compiled version of trace-cmd with Autotest.
Signed-off-by: David Sharp <dhsharp@google.com>
---
trace-util.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/trace-util.c b/trace-util.c
index 33dbdf0..9e0ceca 100644
--- a/trace-util.c
+++ b/trace-util.c
@@ -771,6 +771,7 @@ void trace_util_load_plugins(struct pevent *pevent, const char *suffix,
{
char *home;
char *path;
+ char *envdir;
if (tracecmd_disable_plugins)
return;
@@ -782,7 +783,12 @@ void trace_util_load_plugins(struct pevent *pevent, const char *suffix,
load_plugin, data);
#endif
- /* Now let the home directory override the system defaults */
+ /* Next let the environment-set plugin directory override the system defaults */
+ envdir = getenv("TRACE_CMD_PLUGIN_DIR");
+ if (envdir)
+ trace_util_load_plugins_dir(pevent, suffix, envdir, load_plugin, data);
+
+ /* Now let the home directory override the environment or system defaults */
home = getenv("HOME");
if (!home)
--
1.7.1
next reply other threads:[~2010-09-29 0:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-29 0:00 David Sharp [this message]
2010-10-20 13:28 ` [PATCH] trace-cmd: Search $TRACE_CMD_PLUGIN_DIR for plugins Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1285718416-1470-1-git-send-email-dhsharp@google.com \
--to=dhsharp@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mrubin@google.com \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox