summaryrefslogtreecommitdiffstats
path: root/runtime/staprun/ctl.c
diff options
context:
space:
mode:
authorFrank Ch. Eigler <fche@elastic.org>2007-10-12 18:13:07 -0400
committerFrank Ch. Eigler <fche@elastic.org>2007-10-12 18:13:07 -0400
commit8b64d9c2be16169b73a3d3230e736b7e50161478 (patch)
tree0d1e4e1946e4b57335e076a559c401362cf8093e /runtime/staprun/ctl.c
parentfc6d4679f2eb93d1d114ceb9d47fc9f3cc12aca7 (diff)
parent1969b5bca1098bb03f8bcffc5cc940102a67744c (diff)
downloadsystemtap-steved-8b64d9c2be16169b73a3d3230e736b7e50161478.tar.gz
systemtap-steved-8b64d9c2be16169b73a3d3230e736b7e50161478.tar.xz
systemtap-steved-8b64d9c2be16169b73a3d3230e736b7e50161478.zip
Merge branch 'master' of git://sources.redhat.com/git/systemtap
Diffstat (limited to 'runtime/staprun/ctl.c')
-rw-r--r--runtime/staprun/ctl.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/runtime/staprun/ctl.c b/runtime/staprun/ctl.c
index 7fe57206..af7e6c1a 100644
--- a/runtime/staprun/ctl.c
+++ b/runtime/staprun/ctl.c
@@ -12,18 +12,23 @@
#include "staprun.h"
-int init_ctl_channel(void)
+int init_ctl_channel(int symbols)
{
- char buf[PATH_MAX];
+ char *cname, buf[PATH_MAX];
struct statfs st;
int old_transport = 0;
+
+ if (symbols)
+ cname = ".symbols";
+ else
+ cname = ".cmd";
if (statfs("/sys/kernel/debug", &st) == 0 && (int) st.f_type == (int) DEBUGFS_MAGIC) {
- if (sprintf_chk(buf, "/sys/kernel/debug/systemtap/%s/cmd", modname))
+ if (sprintf_chk(buf, "/sys/kernel/debug/systemtap/%s/%s", modname, cname))
return -1;
} else {
old_transport = 1;
- if (sprintf_chk(buf, "/proc/systemtap/%s/cmd", modname))
+ if (sprintf_chk(buf, "/proc/systemtap/%s/%s", modname, cname))
return -1;
}