Commit 869dd466 authored by Erik Hugne's avatar Erik Hugne Committed by Paul Gortmaker
Browse files

tipc: remove print_buf and deprecated log buffer code



The internal log buffer handling functions can now safely be
removed since there is no code using it anymore.  Requests to
interact with the internal tipc log buffer over netlink (in
config.c) will report 'obsolete command'.

This represents the final removal of any references to a
struct print_buf, and the removal of the struct itself.
We also get rid of a TIPC specific Kconfig in the process.

Finally, log.h is removed since it is not needed anymore.

Signed-off-by: default avatarErik Hugne <erik.hugne@ericsson.com>
Signed-off-by: default avatarJon Maloy <jon.maloy@ericsson.com>
Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
parent dc1aed37
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -102,8 +102,8 @@
#define  TIPC_CMD_SET_LINK_TOL      0x4107    /* tx link_config, rx none */
#define  TIPC_CMD_SET_LINK_PRI      0x4108    /* tx link_config, rx none */
#define  TIPC_CMD_SET_LINK_WINDOW   0x4109    /* tx link_config, rx none */
#define  TIPC_CMD_SET_LOG_SIZE      0x410A    /* tx unsigned, rx none */
#define  TIPC_CMD_DUMP_LOG          0x410B    /* tx none, rx ultra_string */
#define  TIPC_CMD_SET_LOG_SIZE      0x410A    /* obsoleted */
#define  TIPC_CMD_DUMP_LOG          0x410B    /* obsoleted */
#define  TIPC_CMD_RESET_LINK_STATS  0x410C    /* tx link_name, rx none */

/*
+0 −13
Original line number Diff line number Diff line
@@ -41,17 +41,4 @@ config TIPC_PORTS
	  Setting this to a smaller value saves some memory,
	  setting it to higher allows for more ports.

config TIPC_LOG
	int "Size of log buffer"
	depends on TIPC_ADVANCED
	range 0 32768
	default "0"
	help
	  Size (in bytes) of TIPC's internal log buffer, which records the
	  occurrence of significant events.  Can range from 0 to 32768 bytes;
	  default is 0.

	  There is no need to enable the log buffer unless the node will be
	  managed remotely via TIPC.

endif # TIPC
+2 −6
Original line number Diff line number Diff line
@@ -334,12 +334,6 @@ struct sk_buff *tipc_cfg_do_cmd(u32 orig_node, u16 cmd, const void *request_area
	case TIPC_CMD_SHOW_PORTS:
		rep_tlv_buf = tipc_port_get_ports();
		break;
	case TIPC_CMD_SET_LOG_SIZE:
		rep_tlv_buf = tipc_log_resize_cmd(req_tlv_area, req_tlv_space);
		break;
	case TIPC_CMD_DUMP_LOG:
		rep_tlv_buf = tipc_log_dump();
		break;
	case TIPC_CMD_SHOW_STATS:
		rep_tlv_buf = tipc_show_stats();
		break;
@@ -399,6 +393,8 @@ struct sk_buff *tipc_cfg_do_cmd(u32 orig_node, u16 cmd, const void *request_area
	case TIPC_CMD_GET_MAX_CLUSTERS:
	case TIPC_CMD_SET_MAX_NODES:
	case TIPC_CMD_GET_MAX_NODES:
	case TIPC_CMD_SET_LOG_SIZE:
	case TIPC_CMD_DUMP_LOG:
		rep_tlv_buf = tipc_cfg_reply_error_string(TIPC_CFG_NOT_SUPPORTED
							  " (obsolete command)");
		break;
+0 −7
Original line number Diff line number Diff line
@@ -46,9 +46,6 @@
#define CONFIG_TIPC_PORTS 8191
#endif

#ifndef CONFIG_TIPC_LOG
#define CONFIG_TIPC_LOG 0
#endif

/* global variables used by multiple sub-systems within TIPC */
int tipc_random;
@@ -124,7 +121,6 @@ static void tipc_core_stop(void)
	tipc_nametbl_stop();
	tipc_ref_table_stop();
	tipc_socket_stop();
	tipc_log_resize(0);
}

/**
@@ -160,9 +156,6 @@ static int __init tipc_init(void)
{
	int res;

	if (tipc_log_resize(CONFIG_TIPC_LOG) != 0)
		pr_warn("Unable to create log buffer\n");

	pr_info("Activated (version " TIPC_MOD_VER ")\n");

	tipc_own_addr = 0;
+0 −27
Original line number Diff line number Diff line
@@ -63,36 +63,9 @@
#define ULTRA_STRING_MAX_LEN 32768

struct tipc_msg;	/* msg.h */
struct print_buf;	/* log.h */

/*
 * TIPC system monitoring code
 */

/*
 * TIPC's print buffer subsystem supports the following print buffers:
 *
 * TIPC_NULL : null buffer (i.e. print nowhere)
 * TIPC_CONS : system console
 * TIPC_LOG  : TIPC log buffer
 * &buf	     : user-defined buffer (struct print_buf *)
 *
 * Note: TIPC_LOG is configured to echo its output to the system console;
 *       user-defined buffers can be configured to do the same thing.
 */
extern struct print_buf *const TIPC_NULL;
extern struct print_buf *const TIPC_CONS;
extern struct print_buf *const TIPC_LOG;

int tipc_snprintf(char *buf, int len, const char *fmt, ...);

/*
 * TIPC_OUTPUT is the destination print buffer for system messages.
 */
#ifndef TIPC_OUTPUT
#define TIPC_OUTPUT TIPC_LOG
#endif

/*
 * TIPC-specific error codes
 */
Loading