summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-rw-r--r--runtime/stpd/ChangeLog5
-rw-r--r--runtime/stpd/stpd.c10
2 files changed, 13 insertions, 2 deletions
diff --git a/runtime/stpd/ChangeLog b/runtime/stpd/ChangeLog
index 33f4fea1..7dd75470 100644
--- a/runtime/stpd/ChangeLog
+++ b/runtime/stpd/ChangeLog
@@ -1,3 +1,8 @@
+2006-08-02 Tom Zanussi <zanussi@us.ibm.com>
+
+ * stpd.c (main): Use modname rather than driver_pid in
+ stpd_filebase.
+
2006-07-20 Martin Hunt <hunt@redhat.com>
* librelay.c (stp_main_loop): If module doesn't start, kill any
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");