diff options
author | hunt <hunt> | 2007-10-12 19:42:32 +0000 |
---|---|---|
committer | hunt <hunt> | 2007-10-12 19:42:32 +0000 |
commit | 2972246a08bfc7c516455ecc4ef976e10c0ddb2c (patch) | |
tree | 030cb7ae2694103f6c9abb64e5419a0df11368eb /runtime/staprun/ctl.c | |
parent | 7651c16b0e3d7dba7265be5e83720e324bdf64b0 (diff) | |
download | systemtap-steved-2972246a08bfc7c516455ecc4ef976e10c0ddb2c.tar.gz systemtap-steved-2972246a08bfc7c516455ecc4ef976e10c0ddb2c.tar.xz systemtap-steved-2972246a08bfc7c516455ecc4ef976e10c0ddb2c.zip |
2007-10-12 Martin Hunt <hunt@redhat.com>
Changes to separate the symbols from the command channel.
* cap.c (init_cap): Add CAP_DAC_OVERRIDE.
* staprun.h: Change init_ctl_channel prototype.
* ctl.c (init_ctl_channel): Modify to open either
a command or symbol channel. Use ".cmd" and ".symbols"
as the new names.
* mainloop.c (init_stapio): Call init_ctl_channel(0);
* staprun.c (cleanup): Call stop_symbol_thread().
(main): Call start_symbol_thread().
* staprun_funcs.c (handle_symbols): Make a thread.
(start_symbol_thread): New.
(stop_symbol_thread): New.
Diffstat (limited to 'runtime/staprun/ctl.c')
-rw-r--r-- | runtime/staprun/ctl.c | 13 |
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; } |