/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* This file contains the debug defines and routines.
* Debugging information is collected in a circular kernel buffer. Debug
* messages with level lower than rdsdbglvl are ignored. The size of the
* of the debug buffer can be changed by setting 'rds_debug_buf_size' in
*
* The debug buffer can be cleared by setting 'rds_clear_debug_buf_flag = 1'
* on a running system.
*/
#ifdef DEBUG
#else
#endif /* DEBUG */
/* Max length of a debug statement */
/*
* Print Buffer protected by mutex for debug stuff. The mutex also
* ensures serializing debug messages.
*/
/* Function Prototypes */
static void rds_clear_print_buf();
/* RDS logging init */
void
{
if (rds_debug_buf_size <= RDS_DEBUG_SIZE_EXTRA_ALLOC) {
}
/* if it is less that RDS_MIN_DEBUG_BUF_SIZE, adjust it */
"adjusted to %x", rds_debug_buf_size);
}
}
/* RDS logging destroy */
void
{
if (rds_debug_buf) {
}
}
/*
* debug, log, and console message handling
*/
/*
* clear the RDS debug buffer
*/
static void
{
if (rds_debug_buf) {
}
}
static void
{
char *msg_ptr;
/* if not using logging scheme; quit */
return;
}
/* If user requests to clear debug buffer, go ahead */
if (rds_clear_debug_buf_flag != 0) {
}
/*
* put "label" into the buffer
*/
/*
* stuff the message in the debug buf
*/
if (rds_buffer_dprintf) {
/*
* overwrite >>>> that might be over the end of the
* the buffer
*/
*rds_buf_sptr = '\0';
} else {
rds_buf_sptr += len;
}
/* add marker */
}
/*
* LINTR, L5-L2 message may go to the rds_debug_buf
* L0 messages will go to console (debug & non-debug).
*/
switch (level) {
case RDS_LOG_LINTR:
case RDS_LOG_L5:
case RDS_LOG_L4:
case RDS_LOG_L3:
case RDS_LOG_L2:
if (!rds_buffer_dprintf) {
}
break;
case RDS_LOG_L1:
if (!rds_buffer_dprintf) {
} else {
/* go to messages file */
}
break;
case RDS_LOG_L0:
/* Strip the "\n" added earlier */
}
}
/* go to console */
break;
}
}
void
{
}
/*
* Check individual subsystem err levels
*/
return; \
void
{
}
void
{
}
void
{
}
void
{
}
void
{
}
/*
* Function:
* rds_dprintf0
* Input:
* name - Name of the function generating the debug message
* fmt - The message to be displayed.
* Output:
* none
* Returns:
* none
* Description:
* A generic log function to display RDS debug messages.
*/
void
{
}