]> sourceware.org Git - systemtap.git/commitdiff
2006-11-09 Martin Hunt <hunt@redhat.com>
authorhunt <hunt>
Thu, 9 Nov 2006 17:57:40 +0000 (17:57 +0000)
committerhunt <hunt>
Thu, 9 Nov 2006 17:57:40 +0000 (17:57 +0000)
* transport_msgs.h: Change all ints to int32_t. Prefix
all struct names with "_stp".
* transport.c: Use new struct names.
(_stp_handle_start): Send pointer size and endianess.
* procfs.c: Use new struct names.

runtime/transport/ChangeLog
runtime/transport/procfs.c
runtime/transport/transport.c
runtime/transport/transport_msgs.h

index 70b21816a1c6f976a589784eb0b9fc5abe615270..d6206855328c5d033121162d21f14078e0946fb8 100644 (file)
@@ -1,3 +1,11 @@
+2006-11-09  Martin Hunt  <hunt@redhat.com>
+
+       * transport_msgs.h: Change all ints to int32_t. Prefix
+       all struct names with "_stp".
+       * transport.c: Use new struct names.
+       (_stp_handle_start): Send pointer size and endianess.
+       * procfs.c: Use new struct names.
+
 2006-11-02  Martin Hunt  <hunt@redhat.com>
        * symbols.c (_stp_do_module): Fix error message.
 
index 2605e8f131dd43fdb51b877d02c52fa92c3463f9..d208766d1dadc9df7ce776f38f8f1f0cccebcac3 100644 (file)
@@ -87,10 +87,10 @@ static ssize_t _stp_proc_write_cmd (struct file *file, const char __user *buf,
        switch (type) {
        case STP_START:
        {
-               struct transport_start st;
-               if (count < sizeof(struct transport_start))
+               struct _stp_transport_start st;
+               if (count < sizeof(struct _stp_transport_start))
                        return 0;
-               if (copy_from_user (&st, buf, sizeof(struct transport_start)))
+               if (copy_from_user (&st, buf, sizeof(struct _stp_transport_start)))
                        return -EFAULT;
                _stp_handle_start (&st);
                break;
@@ -107,11 +107,11 @@ static ssize_t _stp_proc_write_cmd (struct file *file, const char __user *buf,
                break;
        case STP_TRANSPORT_INFO:
        {
-               struct transport_info ti;
-               kbug("STP_TRANSPORT_INFO %d %d\n", (int)count, (int)sizeof(struct transport_info));
-               if (count < sizeof(struct transport_info))
+               struct _stp_transport_info ti;
+               kbug("STP_TRANSPORT_INFO %d %d\n", (int)count, (int)sizeof(struct _stp_transport_info));
+               if (count < sizeof(struct _stp_transport_info))
                        return 0;
-               if (copy_from_user (&ti, buf, sizeof(struct transport_info)))
+               if (copy_from_user (&ti, buf, sizeof(struct _stp_transport_info)))
                        return -EFAULT;
                if (_stp_transport_open (&ti) < 0)
                        return -1;
index 6e9c9ae1681f3ad8413cc5a7364279a86ba4a88a..b87f763d8491fa8dd2bd69ebfd1e9afe13d49d3d 100644 (file)
@@ -41,11 +41,11 @@ int _stp_exit_flag = 0;
 void probe_exit(void);
 int probe_start(void);
 void _stp_exit(void);
-void _stp_handle_start (struct transport_start *st);
+void _stp_handle_start (struct _stp_transport_start *st);
 static void _stp_work_queue (void *data);
 static DECLARE_WORK(stp_exit, _stp_work_queue, NULL);
 static struct workqueue_struct *_stp_wq;
-int _stp_transport_open(struct transport_info *info);
+int _stp_transport_open(struct _stp_transport_info *info);
 
 #include "procfs.c"
 
@@ -74,7 +74,7 @@ static int _stp_transport_write (void *data, int len)
 #ifdef STP_RELAYFS
 static void _stp_handle_buf_info(int *cpuptr)
 {
-       struct buf_info out;
+       struct _stp_buf_info out;
 
        out.cpu = *cpuptr;
 #if (RELAYFS_CHANNEL_VERSION >= 4) || defined (CONFIG_RELAY)
@@ -93,7 +93,7 @@ static void _stp_handle_buf_info(int *cpuptr)
  *     _stp_handle_start - handle STP_START
  */
 
-void _stp_handle_start (struct transport_start *st)
+void _stp_handle_start (struct _stp_transport_start *st)
 {
 #ifdef CONFIG_MODULES
        static int got_modules=0;
@@ -103,8 +103,10 @@ void _stp_handle_start (struct transport_start *st)
 
        /* we've got a start request, but first, grab kernel symbols if we need them */
        if (_stp_num_modules == 0) {
-               char tmp = 0;
-               _stp_transport_send(STP_SYMBOLS, &tmp, 1);
+               struct _stp_symbol_req req;
+               req.endian = 0x1234;
+               req.ptr_size = sizeof(char *);
+               _stp_transport_send(STP_SYMBOLS, &req, sizeof(req));
                return;
        }
 
@@ -137,7 +139,7 @@ void _stp_handle_start (struct transport_start *st)
 /**
  *     _stp_handle_subbufs_consumed - handle STP_SUBBUFS_CONSUMED
  */
-static void _stp_handle_subbufs_consumed(int pid, struct consumed_info *info)
+static void _stp_handle_subbufs_consumed(int pid, struct _stp_consumed_info *info)
 {
        relay_subbufs_consumed(_stp_chan, info->cpu, info->consumed);
 }
@@ -253,7 +255,7 @@ void _stp_transport_close()
  *      containing the final parameters used.
  */
 
-int _stp_transport_open(struct transport_info *info)
+int _stp_transport_open(struct _stp_transport_info *info)
 {
        kbug ("stp_transport_open: %d Mb buffer. target=%d\n", info->buf_size, info->target);
 
index 282762abf260a97602953a5c808a155512376e4d..f43627f1063c0681acd7e110166de53dcfd74882 100644 (file)
@@ -21,42 +21,47 @@ enum
 };
 
 /* control channel command structs */
-struct buf_info
+struct _stp_buf_info
 {
-       int cpu;
-       unsigned produced;
-       unsigned consumed;
-       int flushing;
+       int32_t cpu;
+       uint32_t produced;
+       uint32_t consumed;
+       int32_t flushing;
 };
 
-struct consumed_info
+struct _stp_consumed_info
 {
-       int cpu;
-       unsigned consumed;
+       int32_t cpu;
+       uint32_t consumed;
 };
 
-struct transport_info
+struct _stp_transport_info
 {
-       unsigned buf_size;
-       unsigned subbuf_size;
-       unsigned n_subbufs;
-       int transport_mode;
-       int merge;              // merge relayfs output?
-       int target;             // target pid
+       uint32_t buf_size;
+       uint32_t subbuf_size;
+       uint32_t n_subbufs;
+       int32_t transport_mode;
+       int32_t merge;          // merge relayfs output?
+       int32_t target;         // target pid
 #if 0
        char cmd[256];          // cmd to process data
 #endif
 };
 
-struct transport_start
+struct _stp_transport_start
 {
-       int pid;        // pid for streaming data
+       int32_t pid;    // pid for streaming data
 };
 
-struct cmd_info
+struct _stp_cmd_info
 {
        char cmd[128];
 };
 
+struct _stp_symbol_req
+{
+       int32_t endian;
+       int32_t ptr_size;
+};
 
        
This page took 0.034231 seconds and 5 git commands to generate.