summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--runtime/ChangeLog4
-rw-r--r--runtime/procfs.c5
-rw-r--r--runtime/transport/ChangeLog5
-rw-r--r--runtime/transport/procfs.c8
4 files changed, 19 insertions, 3 deletions
diff --git a/runtime/ChangeLog b/runtime/ChangeLog
index 945a1894..ddad637f 100644
--- a/runtime/ChangeLog
+++ b/runtime/ChangeLog
@@ -1,3 +1,7 @@
+2009-02-13 David Smith <dsmith@redhat.com>
+
+ * procfs.c: Added macros to guard against multiple inclusion.
+
2009-02-12 David Smith <dsmith@redhat.com>
* procfs.c (_stp_rmdir_proc_module): Changed
diff --git a/runtime/procfs.c b/runtime/procfs.c
index afedb4f4..7e3c8352 100644
--- a/runtime/procfs.c
+++ b/runtime/procfs.c
@@ -14,6 +14,9 @@
* number of needed files.
*/
+#ifndef _STP_PROCFS_C_
+#define _STP_PROCFS_C_
+
#define STP_MAX_PROCFS_FILES 16
static int _stp_num_pde = 0;
static int _stp_num_procfs_files = 0;
@@ -209,3 +212,5 @@ static void _stp_close_procfs(void)
_stp_num_pde = 0;
_stp_rmdir_proc_module();
}
+
+#endif /* _STP_PROCFS_C_ */
diff --git a/runtime/transport/ChangeLog b/runtime/transport/ChangeLog
index e753b288..e70f2e7b 100644
--- a/runtime/transport/ChangeLog
+++ b/runtime/transport/ChangeLog
@@ -1,3 +1,8 @@
+2009-02-13 David Smith <dsmith@redhat.com>
+
+ * procfs.c: Added inclusion of ../procfs.c for
+ _stp_mkdir_proc_module().
+
2009-02-12 David Smith <dsmith@redhat.com>
* transport.c: Moved inclusion of procfs.c to
diff --git a/runtime/transport/procfs.c b/runtime/transport/procfs.c
index ca33e0fd..0c31ae3c 100644
--- a/runtime/transport/procfs.c
+++ b/runtime/transport/procfs.c
@@ -9,6 +9,8 @@
* later version.
*/
+#include "../procfs.c" // for _stp_mkdir_proc_module()
+
#define STP_DEFAULT_BUFFERS 256
static int _stp_current_buffers = STP_DEFAULT_BUFFERS;
@@ -72,7 +74,7 @@ static ssize_t _stp_ctl_write_cmd(struct file *file, const char __user *buf, siz
if (get_user(type, (int __user *)buf))
return -EFAULT;
-#if DEBUG_TRANSPORT > 0
+#if DEBUG_TRANS
if (type < STP_MAX_CMD)
_dbug("Got %s. len=%d\n", _stp_command_name[type], (int)count);
#endif
@@ -121,7 +123,7 @@ struct _stp_buffer {
static DECLARE_WAIT_QUEUE_HEAD(_stp_ctl_wq);
-#if DEBUG_TRANSPORT > 0
+#if DEBUG_TRANS
static void _stp_ctl_write_dbug(int type, void *data, int len)
{
char buf[64];
@@ -155,7 +157,7 @@ static int _stp_ctl_write(int type, void *data, int len)
struct _stp_buffer *bptr;
unsigned long flags;
-#if DEBUG_TRANSPORT > 0
+#if DEBUG_TRANS
_stp_ctl_write_dbug(type, data, len);
#endif