diff options
author | Allan Stephens <Allan.Stephens@windriver.com> | 2010-12-31 18:59:24 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-01-01 13:57:51 -0800 |
commit | f5e75269f59f7c3816f23314b924895e4ecf8409 (patch) | |
tree | 1a54ae8f9f2f5682f6f0c997bbb2f2e5e4283ef2 /net | |
parent | 5af5479296fba0ace5d5cab84045de5b19bde3fe (diff) | |
download | linux-3.10-f5e75269f59f7c3816f23314b924895e4ecf8409.tar.gz linux-3.10-f5e75269f59f7c3816f23314b924895e4ecf8409.tar.bz2 linux-3.10-f5e75269f59f7c3816f23314b924895e4ecf8409.zip |
tipc: rename dbg.[ch] to log.[ch]
As the first step in removing obsolete debugging code from TIPC the
files that implement TIPC's non-debug-related log buffer subsystem
are renamed to better reflect their true nature.
Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/tipc/Makefile | 2 | ||||
-rw-r--r-- | net/tipc/core.h | 2 | ||||
-rw-r--r-- | net/tipc/link.h | 2 | ||||
-rw-r--r-- | net/tipc/log.c (renamed from net/tipc/dbg.c) | 26 | ||||
-rw-r--r-- | net/tipc/log.h (renamed from net/tipc/dbg.h) | 2 |
5 files changed, 15 insertions, 19 deletions
diff --git a/net/tipc/Makefile b/net/tipc/Makefile index d41cd110fe7..521d24d04ab 100644 --- a/net/tipc/Makefile +++ b/net/tipc/Makefile @@ -8,6 +8,6 @@ tipc-y += addr.o bcast.o bearer.o config.o \ core.o handler.o link.o discover.o msg.o \ name_distr.o subscr.o name_table.o net.o \ netlink.o node.o node_subscr.o port.o ref.o \ - socket.o dbg.o eth_media.o + socket.o log.o eth_media.o # End of file diff --git a/net/tipc/core.h b/net/tipc/core.h index c44f955bd54..17f3670ed95 100644 --- a/net/tipc/core.h +++ b/net/tipc/core.h @@ -59,7 +59,7 @@ #define TIPC_MOD_VER "2.0.0" struct tipc_msg; /* msg.h */ -struct print_buf; /* dbg.h */ +struct print_buf; /* log.h */ /* * TIPC sanity test macros diff --git a/net/tipc/link.h b/net/tipc/link.h index c562888d25d..eeb0c015dba 100644 --- a/net/tipc/link.h +++ b/net/tipc/link.h @@ -37,7 +37,7 @@ #ifndef _TIPC_LINK_H #define _TIPC_LINK_H -#include "dbg.h" +#include "log.h" #include "msg.h" #include "node.h" diff --git a/net/tipc/dbg.c b/net/tipc/log.c index 46f51d208e5..9d99f7097d2 100644 --- a/net/tipc/dbg.c +++ b/net/tipc/log.c @@ -1,5 +1,5 @@ /* - * net/tipc/dbg.c: TIPC print buffer routines for debugging + * net/tipc/log.c: TIPC print buffer routines for debugging * * Copyright (c) 1996-2006, Ericsson AB * Copyright (c) 2005-2007, Wind River Systems @@ -36,7 +36,7 @@ #include "core.h" #include "config.h" -#include "dbg.h" +#include "log.h" /* * TIPC pre-defines the following print buffers: @@ -81,13 +81,13 @@ static int tipc_printbuf_empty(struct print_buf *pb); static void tipc_printbuf_move(struct print_buf *pb_to, struct print_buf *pb_from); -#define FORMAT(PTR,LEN,FMT) \ +#define FORMAT(PTR, LEN, FMT) \ {\ - va_list args;\ - va_start(args, FMT);\ - LEN = vsprintf(PTR, FMT, args);\ - va_end(args);\ - *(PTR + LEN) = '\0';\ + va_list args;\ + va_start(args, FMT);\ + LEN = vsprintf(PTR, FMT, args);\ + va_end(args);\ + *(PTR + LEN) = '\0';\ } /** @@ -353,10 +353,8 @@ int tipc_log_resize(int log_size) int res = 0; spin_lock_bh(&print_lock); - if (TIPC_LOG->buf) { - kfree(TIPC_LOG->buf); - TIPC_LOG->buf = NULL; - } + kfree(TIPC_LOG->buf); + TIPC_LOG->buf = NULL; if (log_size) { if (log_size < TIPC_PB_MIN_SIZE) log_size = TIPC_PB_MIN_SIZE; @@ -407,8 +405,7 @@ struct sk_buff *tipc_log_dump(void) } else if (tipc_printbuf_empty(TIPC_LOG)) { spin_unlock_bh(&print_lock); reply = tipc_cfg_reply_ultra_string("log is empty\n"); - } - else { + } else { struct tlv_desc *rep_tlv; struct print_buf pb; int str_len; @@ -429,4 +426,3 @@ struct sk_buff *tipc_log_dump(void) } return reply; } - diff --git a/net/tipc/dbg.h b/net/tipc/log.h index 3ba6ba8b434..f4343bb9e42 100644 --- a/net/tipc/dbg.h +++ b/net/tipc/log.h @@ -1,5 +1,5 @@ /* - * net/tipc/dbg.h: Include file for TIPC print buffer routines + * net/tipc/log.h: Include file for TIPC print buffer routines * * Copyright (c) 1997-2006, Ericsson AB * Copyright (c) 2005-2007, Wind River Systems |