summaryrefslogtreecommitdiffstats
path: root/runtime/transport/procfs.c
diff options
context:
space:
mode:
authorDavid Smith <dsmith@redhat.com>2009-05-12 13:38:48 -0500
committerDavid Smith <dsmith@redhat.com>2009-05-12 13:38:48 -0500
commitdd9a3bcbef65bde65491d959e9458bc641924811 (patch)
tree56b2df83734947e903b4fb5daa009df98d9a6cdd /runtime/transport/procfs.c
parent945563a795f312551157b69542ed1bc3323203c7 (diff)
downloadsystemtap-steved-dd9a3bcbef65bde65491d959e9458bc641924811.tar.gz
systemtap-steved-dd9a3bcbef65bde65491d959e9458bc641924811.tar.xz
systemtap-steved-dd9a3bcbef65bde65491d959e9458bc641924811.zip
Start at supporting the original transport (STP_TRANSPORT_VERSION=1).
* runtime/print.c: Only use print_new.c. * runtime/print_new.c (stp_print_flush): Add STP_TRANSPORT_VERSION 1 support. * runtime/transport/transport.c: Removed inclusion of procfs.c. * runtime/transport/procfs.c (_stp_proc_read): Adapt to new interface. (_stp_proc_write): Ditto. * runtime/transport/relayfs.c: Ditto.
Diffstat (limited to 'runtime/transport/procfs.c')
-rw-r--r--runtime/transport/procfs.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/runtime/transport/procfs.c b/runtime/transport/procfs.c
index 6afbdea1..9e05cc14 100644
--- a/runtime/transport/procfs.c
+++ b/runtime/transport/procfs.c
@@ -14,7 +14,6 @@
#define STP_DEFAULT_BUFFERS 256
#ifdef STP_BULKMODE
-extern int _stp_relay_flushing;
/* handle the per-cpu subbuf info read for relayfs */
static ssize_t _stp_proc_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)
{
@@ -23,13 +22,13 @@ static ssize_t _stp_proc_read(struct file *file, char __user *buf, size_t count,
int cpu = *(int *)(PDE(file->f_dentry->d_inode)->data);
- if (!_stp_utt->rchan)
+ if (!_stp_relay_data.rchan)
return -EINVAL;
out.cpu = cpu;
- out.produced = atomic_read(&_stp_utt->rchan->buf[cpu]->subbufs_produced);
- out.consumed = atomic_read(&_stp_utt->rchan->buf[cpu]->subbufs_consumed);
- out.flushing = _stp_relay_flushing;
+ out.produced = atomic_read(&_stp_relay_data.rchan->buf[cpu]->subbufs_produced);
+ out.consumed = atomic_read(&_stp_relay_data.rchan->buf[cpu]->subbufs_consumed);
+ out.flushing = _stp_relay_data.flushing;
num = sizeof(out);
if (copy_to_user(buf, &out, num))
@@ -46,7 +45,7 @@ static ssize_t _stp_proc_write(struct file *file, const char __user *buf, size_t
if (copy_from_user(&info, buf, count))
return -EFAULT;
- relay_subbufs_consumed(_stp_utt->rchan, cpu, info.consumed);
+ relay_subbufs_consumed(_stp_relay_data.rchan, cpu, info.consumed);
return count;
}