+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.
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;
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_ */