diff options
author | trz <trz> | 2006-08-02 14:06:35 +0000 |
---|---|---|
committer | trz <trz> | 2006-08-02 14:06:35 +0000 |
commit | 44b1b985e8880444f644c638044650419f71b080 (patch) | |
tree | 62a1dba746fdacca65f179d361b64e6c86ff7adc /runtime/stpd/stpd.c | |
parent | 8d6958765e6252c0dd8157f837b0005f83aa80cb (diff) | |
download | systemtap-steved-44b1b985e8880444f644c638044650419f71b080.tar.gz systemtap-steved-44b1b985e8880444f644c638044650419f71b080.tar.xz systemtap-steved-44b1b985e8880444f644c638044650419f71b080.zip |
Fix for bug #2992
Diffstat (limited to 'runtime/stpd/stpd.c')
-rw-r--r-- | runtime/stpd/stpd.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/runtime/stpd/stpd.c b/runtime/stpd/stpd.c index 0b36fbb7..3158e5ed 100644 --- a/runtime/stpd/stpd.c +++ b/runtime/stpd/stpd.c @@ -211,8 +211,14 @@ int main(int argc, char **argv) if (statfs("/mnt/relay", &st) == 0 && (int) st.f_type == (int) RELAYFS_MAGIC) sprintf(stpd_filebase, "/mnt/relay/%d/cpu", getpid()); - else - sprintf(stpd_filebase, "/proc/systemtap/stap_%d/cpu", driver_pid); + else { + char *ptr; + sprintf(stpd_filebase, "/proc/systemtap/%s", modname); + ptr = index(stpd_filebase,'.'); + if (ptr) + *ptr = 0; + strcat(stpd_filebase, "/cpu"); + } if (init_stp(stpd_filebase, !quiet)) { //fprintf(stderr, "Couldn't initialize stpd. Exiting.\n"); |