summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhaolei <zhaolei@cn.fujitsu.com>2008-06-02 11:20:56 +0800
committerZhaolei <zhaolei@cn.fujitsu.com>2008-06-02 11:20:56 +0800
commita929fd0f0a377972e62212f5ea3b18983192a998 (patch)
tree6ab3464b91471f11348b12221dec74e5ac212609
parent674f031748bafd7fb8300544d3f912aaad2bde02 (diff)
downloadsystemtap-steved-a929fd0f0a377972e62212f5ea3b18983192a998.tar.gz
systemtap-steved-a929fd0f0a377972e62212f5ea3b18983192a998.tar.xz
systemtap-steved-a929fd0f0a377972e62212f5ea3b18983192a998.zip
Fix the problem that kernel module compile failure when runtime
directory is set to relative path(stap -R).
-rw-r--r--ChangeLog5
-rw-r--r--main.cxx10
2 files changed, 15 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 963ad1c9..7efeeb9f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-06-02 Zhaolei <zhaolei@cn.fujitsu.com>
+
+ * main.cxx (main): Fix the problem that kernel module compile
+ failure when runtime directory is set to relative path(stap -R).
+
2008-05-30 Srinivasa DS <srinivasa@in.ibm.com>
PR 6562
* tapsets.cxx, translate.cxx: modified one argument for
diff --git a/main.cxx b/main.cxx
index b7eac167..7b5decd8 100644
--- a/main.cxx
+++ b/main.cxx
@@ -662,6 +662,16 @@ main (int argc, char * const argv [])
usage(s, 1);
}
+ // translate path of runtime to absolute path
+ if (s.runtime_path[0] != '/')
+ {
+ char cwd[PATH_MAX];
+ if (getcwd(cwd, sizeof(cwd)))
+ {
+ s.runtime_path = string(cwd) + "/" + s.runtime_path;
+ }
+ }
+
int rc = 0;
// override PATH and LC_ALL