aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/core.h
diff options
context:
space:
mode:
authorAllan Stephens <allan.stephens@windriver.com>2006-10-17 00:42:04 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2006-10-18 22:55:14 -0400
commit29ede244cc4cfb11432a0bffd158ba09e7b2c167 (patch)
treeacb07b6ffa1561bcd297a50458ed7aa7e8278e14 /net/tipc/core.h
parent065fd1772af2032bebdce006071df007c039734d (diff)
[TIPC]: Debug print buffer enhancements and fixes
This change modifies TIPC's print buffer code as follows: 1) Now supports small print buffers (min. size reduced from 512 bytes to 64) 2) Now uses TIPC_NULL print buffer structure to indicate null device instead of NULL pointer (this simplified error handling) 3) Fixed misuse of console buffer structure by tipc_dump() 4) Added and corrected comments in various places Signed-off-by: Allan Stephens <allan.stephens@windriver.com> Signed-off-by: Per Liden <per.liden@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/core.h')
-rw-r--r--net/tipc/core.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/net/tipc/core.h b/net/tipc/core.h
index 762aac2572be..47504ec15d89 100644
--- a/net/tipc/core.h
+++ b/net/tipc/core.h
@@ -65,7 +65,7 @@
65#define assert(i) BUG_ON(!(i)) 65#define assert(i) BUG_ON(!(i))
66 66
67struct tipc_msg; 67struct tipc_msg;
68extern struct print_buf *TIPC_CONS, *TIPC_LOG; 68extern struct print_buf *TIPC_NULL, *TIPC_CONS, *TIPC_LOG;
69extern struct print_buf *TIPC_TEE(struct print_buf *, struct print_buf *); 69extern struct print_buf *TIPC_TEE(struct print_buf *, struct print_buf *);
70void tipc_msg_print(struct print_buf*,struct tipc_msg *,const char*); 70void tipc_msg_print(struct print_buf*,struct tipc_msg *,const char*);
71void tipc_printf(struct print_buf *, const char *fmt, ...); 71void tipc_printf(struct print_buf *, const char *fmt, ...);
@@ -94,11 +94,11 @@ void tipc_dump(struct print_buf*,const char *fmt, ...);
94 * here, or on a per .c file basis, by redefining these symbols. The following 94 * here, or on a per .c file basis, by redefining these symbols. The following
95 * print buffer options are available: 95 * print buffer options are available:
96 * 96 *
97 * NULL : Output to null print buffer (i.e. print nowhere) 97 * TIPC_NULL : null buffer (i.e. print nowhere)
98 * TIPC_CONS : Output to system console 98 * TIPC_CONS : system console
99 * TIPC_LOG : Output to TIPC log buffer 99 * TIPC_LOG : TIPC log buffer
100 * &buf : Output to user-defined buffer (struct print_buf *) 100 * &buf : user-defined buffer (struct print_buf *)
101 * TIPC_TEE(&buf_a,&buf_b) : Output to two print buffers (eg. TIPC_TEE(TIPC_CONS,TIPC_LOG) ) 101 * TIPC_TEE(&buf_a,&buf_b) : list of buffers (eg. TIPC_TEE(TIPC_CONS,TIPC_LOG))
102 */ 102 */
103 103
104#ifndef TIPC_OUTPUT 104#ifndef TIPC_OUTPUT
@@ -106,7 +106,7 @@ void tipc_dump(struct print_buf*,const char *fmt, ...);
106#endif 106#endif
107 107
108#ifndef DBG_OUTPUT 108#ifndef DBG_OUTPUT
109#define DBG_OUTPUT NULL 109#define DBG_OUTPUT TIPC_NULL
110#endif 110#endif
111 111
112#else 112#else
@@ -136,7 +136,7 @@ void tipc_dump(struct print_buf*,const char *fmt, ...);
136#define TIPC_OUTPUT TIPC_CONS 136#define TIPC_OUTPUT TIPC_CONS
137 137
138#undef DBG_OUTPUT 138#undef DBG_OUTPUT
139#define DBG_OUTPUT NULL 139#define DBG_OUTPUT TIPC_NULL
140 140
141#endif 141#endif
142 142