diff options
author | hunt <hunt> | 2007-03-26 16:15:11 +0000 |
---|---|---|
committer | hunt <hunt> | 2007-03-26 16:15:11 +0000 |
commit | 5d65678dde08d0b2e34ee79c2e0f6c26ff3e4592 (patch) | |
tree | 05cdd33db206b646c424dd8b207221413cbb2455 /runtime/staprun/ctl.c | |
parent | 98f0ea565abd496f7f4f065f652456101370751e (diff) | |
download | systemtap-steved-5d65678dde08d0b2e34ee79c2e0f6c26ff3e4592.tar.gz systemtap-steved-5d65678dde08d0b2e34ee79c2e0f6c26ff3e4592.tar.xz systemtap-steved-5d65678dde08d0b2e34ee79c2e0f6c26ff3e4592.zip |
2007-03-26 Martin Hunt <hunt@redhat.com>
* mainloop.c (run_stp_check): Just use system() call.
(init_staprun): Remove _stp_pid module parameter.
(cleanup_and_exit): If closed==2, just exit without removing module.
(driver_poll): Remove. We no longer require stap running.
(_stp_main_loop): Remove call to driver_poll.
* ctl.c (init_ctl_channel): Don't put files in systemtap_pid,
revert back to systemtap/modulename.
* relay.c: Revert back to systemtap/modulename paths.
* relay_old.c: Ditto.
* staprun.c: Add -L and -A args.
Diffstat (limited to 'runtime/staprun/ctl.c')
-rw-r--r-- | runtime/staprun/ctl.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/runtime/staprun/ctl.c b/runtime/staprun/ctl.c index 9336631c..a217d270 100644 --- a/runtime/staprun/ctl.c +++ b/runtime/staprun/ctl.c @@ -18,14 +18,18 @@ int init_ctl_channel(void) struct statfs st; if (statfs("/sys/kernel/debug", &st) == 0 && (int) st.f_type == (int) DEBUGFS_MAGIC) - sprintf (buf, "/sys/kernel/debug/systemtap_%d/cmd", getpid()); + sprintf (buf, "/sys/kernel/debug/systemtap/%s/cmd", modname); else - sprintf (buf, "/proc/systemtap_%d/cmd", getpid()); + sprintf (buf, "/proc/systemtap/%s/cmd", modname); dbug("Opening %s\n", buf); control_channel = open(buf, O_RDWR); if (control_channel < 0) { - fprintf(stderr, "ERROR: couldn't open control channel %s: errcode = %s\n", buf, strerror(errno)); + if (attach_mod) + fprintf (stderr, "ERROR: Cannot connect to module \"%s\".\n", modname); + else + fprintf (stderr, "ERROR: couldn't open control channel %s\n", buf); + fprintf (stderr, "errcode = %s\n", strerror(errno)); return -1; } return 0; |