summaryrefslogtreecommitdiffstats
path: root/runtime/transport/procfs.c
diff options
context:
space:
mode:
authorhunt <hunt>2006-11-02 18:37:00 +0000
committerhunt <hunt>2006-11-02 18:37:00 +0000
commitf1bad60c76d79f01a87e4128df266bf4252a71e0 (patch)
tree5114f087d844e702253a439efbcc36e310268a4b /runtime/transport/procfs.c
parent202e1828643725d7bebef76c48cbaa28c463cee3 (diff)
downloadsystemtap-steved-f1bad60c76d79f01a87e4128df266bf4252a71e0.tar.gz
systemtap-steved-f1bad60c76d79f01a87e4128df266bf4252a71e0.tar.xz
systemtap-steved-f1bad60c76d79f01a87e4128df266bf4252a71e0.zip
New dynamic module and symbol handling code.
Diffstat (limited to 'runtime/transport/procfs.c')
-rw-r--r--runtime/transport/procfs.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/runtime/transport/procfs.c b/runtime/transport/procfs.c
index b0b03a73..2605e8f1 100644
--- a/runtime/transport/procfs.c
+++ b/runtime/transport/procfs.c
@@ -82,6 +82,7 @@ static ssize_t _stp_proc_write_cmd (struct file *file, const char __user *buf,
//printk ("_stp_proc_write_cmd. count:%d type:%d\n", count, type);
count -= sizeof(int);
+ buf += sizeof(int);
switch (type) {
case STP_START:
@@ -94,16 +95,23 @@ static ssize_t _stp_proc_write_cmd (struct file *file, const char __user *buf,
_stp_handle_start (&st);
break;
}
+
+ case STP_SYMBOLS:
+ count = _stp_do_symbols(buf, count);
+ break;
+ case STP_MODULE:
+ count = _stp_do_module(buf, count);
+ break;
case STP_EXIT:
_stp_exit_flag = 1;
break;
case STP_TRANSPORT_INFO:
{
struct transport_info ti;
- //printk("STP_TRANSPORT_INFO %d %d\n", count, sizeof(struct transport_info));
+ kbug("STP_TRANSPORT_INFO %d %d\n", (int)count, (int)sizeof(struct transport_info));
if (count < sizeof(struct transport_info))
return 0;
- if (copy_from_user (&ti, &buf[4], sizeof(struct transport_info)))
+ if (copy_from_user (&ti, buf, sizeof(struct transport_info)))
return -EFAULT;
if (_stp_transport_open (&ti) < 0)
return -1;