]> sourceware.org Git - systemtap.git/commitdiff
2007-03-28 Martin Hunt <hunt@redhat.com>
authorhunt <hunt>
Wed, 28 Mar 2007 16:11:28 +0000 (16:11 +0000)
committerhunt <hunt>
Wed, 28 Mar 2007 16:11:28 +0000 (16:11 +0000)
* control.c (_stp_ctl_open_cmd): Set _stp_pid.
(stp_ctl_close_cmd): Clear _stp_pid.
* transport.h: Declare _stp_pid;

runtime/transport/ChangeLog
runtime/transport/control.c
runtime/transport/transport.h

index 40519dee48139fdf5c0fa82ee8a86d7d3b520bd9..319c50acd46fdb6698210f569ee61f8ccd358d10 100644 (file)
@@ -1,3 +1,9 @@
+2007-03-28  Martin Hunt  <hunt@redhat.com>
+
+       * control.c (_stp_ctl_open_cmd): Set _stp_pid.
+       (stp_ctl_close_cmd): Clear _stp_pid.
+       * transport.h: Declare _stp_pid;
+
 2007-03-26  Frank Ch. Eigler  <fche@elastic.org>
 
        * transport.c: Add #include <linux/namei.h> for lookup_one_len.
index 2924edabdb9f880f6835ca389ec77b05df88c421..443b23022d48634fda328e5702fdc847eac82b6b 100644 (file)
@@ -206,10 +206,25 @@ _stp_ctl_read_cmd (struct file *file, char __user *buf, size_t count, loff_t *pp
        return len;
 }
 
+static int _stp_ctl_open_cmd (struct inode *inode, struct file *file)
+{
+       _stp_pid = current->pid;
+       return 0;
+}
+
+static int _stp_ctl_close_cmd (struct inode *inode, struct file *file)
+{
+       _stp_pid = 0;
+       return 0;
+
+}
+
 static struct file_operations _stp_ctl_fops_cmd = {
        .owner = THIS_MODULE,
        .read = _stp_ctl_read_cmd,
        .write = _stp_ctl_write_cmd,
+       .open = _stp_ctl_open_cmd,
+       .release = _stp_ctl_close_cmd,
 };
 
 static struct dentry *_stp_cmd_file = NULL;
index 09a0615ec4510d5780998fc1c5edb0d773a7decf..d1e97edbcb5c44c29ccdb00f6debbbc1fbd9d863 100644 (file)
@@ -22,4 +22,6 @@ extern void _stp_print_cleanup(void);
 static struct dentry *_stp_get_root_dir(const char *name);
 static int _stp_lock_debugfs(void);
 static void _stp_unlock_debugfs(void);
+int _stp_pid = 0;
+
 #endif /* _TRANSPORT_TRANSPORT_H_ */
This page took 0.031424 seconds and 5 git commands to generate.