aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllan Stephens <Allan.Stephens@windriver.com>2010-12-31 13:59:24 -0500
committerDavid S. Miller <davem@davemloft.net>2011-01-01 16:57:51 -0500
commitf5e75269f59f7c3816f23314b924895e4ecf8409 (patch)
tree1a54ae8f9f2f5682f6f0c997bbb2f2e5e4283ef2
parent5af5479296fba0ace5d5cab84045de5b19bde3fe (diff)
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>
-rw-r--r--net/tipc/Makefile2
-rw-r--r--net/tipc/core.h2
-rw-r--r--net/tipc/link.h2
-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 d41cd110fe7d..521d24d04ab2 100644
--- a/net/tipc/Makefile
+++ b/net/tipc/Makefile
@@ -8,6 +8,6 @@ tipc-y += addr.o bcast.o bearer.o config.o \
8 core.o handler.o link.o discover.o msg.o \ 8 core.o handler.o link.o discover.o msg.o \
9 name_distr.o subscr.o name_table.o net.o \ 9 name_distr.o subscr.o name_table.o net.o \
10 netlink.o node.o node_subscr.o port.o ref.o \ 10 netlink.o node.o node_subscr.o port.o ref.o \
11 socket.o dbg.o eth_media.o 11 socket.o log.o eth_media.o
12 12
13# End of file 13# End of file
diff --git a/net/tipc/core.h b/net/tipc/core.h
index c44f955bd54a..17f3670ed95d 100644
--- a/net/tipc/core.h
+++ b/net/tipc/core.h
@@ -59,7 +59,7 @@
59#define TIPC_MOD_VER "2.0.0" 59#define TIPC_MOD_VER "2.0.0"
60 60
61struct tipc_msg; /* msg.h */ 61struct tipc_msg; /* msg.h */
62struct print_buf; /* dbg.h */ 62struct print_buf; /* log.h */
63 63
64/* 64/*
65 * TIPC sanity test macros 65 * TIPC sanity test macros
diff --git a/net/tipc/link.h b/net/tipc/link.h
index c562888d25da..eeb0c015dba9 100644
--- a/net/tipc/link.h
+++ b/net/tipc/link.h
@@ -37,7 +37,7 @@
37#ifndef _TIPC_LINK_H 37#ifndef _TIPC_LINK_H
38#define _TIPC_LINK_H 38#define _TIPC_LINK_H
39 39
40#include "dbg.h" 40#include "log.h"
41#include "msg.h" 41#include "msg.h"
42#include "node.h" 42#include "node.h"
43 43
diff --git a/net/tipc/dbg.c b/net/tipc/log.c
index 46f51d208e5e..9d99f7097d2d 100644
--- a/net/tipc/dbg.c
+++ b/net/tipc/log.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * net/tipc/dbg.c: TIPC print buffer routines for debugging 2 * net/tipc/log.c: TIPC print buffer routines for debugging
3 * 3 *
4 * Copyright (c) 1996-2006, Ericsson AB 4 * Copyright (c) 1996-2006, Ericsson AB
5 * Copyright (c) 2005-2007, Wind River Systems 5 * Copyright (c) 2005-2007, Wind River Systems
@@ -36,7 +36,7 @@
36 36
37#include "core.h" 37#include "core.h"
38#include "config.h" 38#include "config.h"
39#include "dbg.h" 39#include "log.h"
40 40
41/* 41/*
42 * TIPC pre-defines the following print buffers: 42 * TIPC pre-defines the following print buffers:
@@ -81,13 +81,13 @@ static int tipc_printbuf_empty(struct print_buf *pb);
81static void tipc_printbuf_move(struct print_buf *pb_to, 81static void tipc_printbuf_move(struct print_buf *pb_to,
82 struct print_buf *pb_from); 82 struct print_buf *pb_from);
83 83
84#define FORMAT(PTR,LEN,FMT) \ 84#define FORMAT(PTR, LEN, FMT) \
85{\ 85{\
86 va_list args;\ 86 va_list args;\
87 va_start(args, FMT);\ 87 va_start(args, FMT);\
88 LEN = vsprintf(PTR, FMT, args);\ 88 LEN = vsprintf(PTR, FMT, args);\
89 va_end(args);\ 89 va_end(args);\
90 *(PTR + LEN) = '\0';\ 90 *(PTR + LEN) = '\0';\
91} 91}
92 92
93/** 93/**
@@ -353,10 +353,8 @@ int tipc_log_resize(int log_size)
353 int res = 0; 353 int res = 0;
354 354
355 spin_lock_bh(&print_lock); 355 spin_lock_bh(&print_lock);
356 if (TIPC_LOG->buf) { 356 kfree(TIPC_LOG->buf);
357 kfree(TIPC_LOG->buf); 357 TIPC_LOG->buf = NULL;
358 TIPC_LOG->buf = NULL;
359 }
360 if (log_size) { 358 if (log_size) {
361 if (log_size < TIPC_PB_MIN_SIZE) 359 if (log_size < TIPC_PB_MIN_SIZE)
362 log_size = TIPC_PB_MIN_SIZE; 360 log_size = TIPC_PB_MIN_SIZE;
@@ -407,8 +405,7 @@ struct sk_buff *tipc_log_dump(void)
407 } else if (tipc_printbuf_empty(TIPC_LOG)) { 405 } else if (tipc_printbuf_empty(TIPC_LOG)) {
408 spin_unlock_bh(&print_lock); 406 spin_unlock_bh(&print_lock);
409 reply = tipc_cfg_reply_ultra_string("log is empty\n"); 407 reply = tipc_cfg_reply_ultra_string("log is empty\n");
410 } 408 } else {
411 else {
412 struct tlv_desc *rep_tlv; 409 struct tlv_desc *rep_tlv;
413 struct print_buf pb; 410 struct print_buf pb;
414 int str_len; 411 int str_len;
@@ -429,4 +426,3 @@ struct sk_buff *tipc_log_dump(void)
429 } 426 }
430 return reply; 427 return reply;
431} 428}
432
diff --git a/net/tipc/dbg.h b/net/tipc/log.h
index 3ba6ba8b434a..f4343bb9e429 100644
--- a/net/tipc/dbg.h
+++ b/net/tipc/log.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * net/tipc/dbg.h: Include file for TIPC print buffer routines 2 * net/tipc/log.h: Include file for TIPC print buffer routines
3 * 3 *
4 * Copyright (c) 1997-2006, Ericsson AB 4 * Copyright (c) 1997-2006, Ericsson AB
5 * Copyright (c) 2005-2007, Wind River Systems 5 * Copyright (c) 2005-2007, Wind River Systems