enx_log.c revision b494511a9cf72b1fc4eb13a0e593f55c624ab829
/*
* 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
*/
/*
*/
/*
* Defaults
*/
int enx_log_timestamps = 0;
/*
* Debug variables, should not be tunables so allocated debug buffer
* and its size remain consistent.
*/
static kmutex_t enx_debug_buf_lock;
static uint8_t *enx_debug_buf;
static uint32_t enx_debug_buf_ndx;
static uint_t enx_debug_buf_sz;
static void eibnx_log(char *);
void
eibnx_debug_init(void)
{
enx_debug_buf_ndx = 0;
}
void
eibnx_debug_fini(void)
{
if (enx_debug_buf && enx_debug_buf_sz) {
}
enx_debug_buf_sz = 0;
enx_debug_buf_ndx = 0;
}
void
{
int msglen;
char msgbuf[ENX_MAX_LINE];
if (enx_debug_buf == NULL)
return;
if (enx_log_timestamps) {
(unsigned long long)ddi_get_lbolt64(), msg);
} else {
}
if (msglen < 0)
return;
else if (msglen >= ENX_MAX_LINE)
if ((enx_debug_buf_ndx == 0) ||
}
enx_debug_buf_ndx = 0;
}
#ifdef ENX_DEBUG
void
eibnx_dprintf_verbose(const char *fmt, ...)
{
int msglen;
char msgbuf[ENX_MAX_LINE];
char newfmt[ENX_MAX_LINE];
return;
if (msglen > 0) {
}
}
void
eibnx_dprintf_args(const char *fmt, ...)
{
int msglen;
char msgbuf[ENX_MAX_LINE];
char newfmt[ENX_MAX_LINE];
return;
if (msglen > 0) {
}
}
void
eibnx_dprintf_debug(const char *fmt, ...)
{
int msglen;
char msgbuf[ENX_MAX_LINE];
char newfmt[ENX_MAX_LINE];
return;
if (msglen > 0) {
}
}
#endif
void
eibnx_dprintf_warn(const char *fmt, ...)
{
int msglen;
char msgbuf[ENX_MAX_LINE];
char newfmt[ENX_MAX_LINE];
return;
if (msglen > 0) {
}
}
void
eibnx_dprintf_err(const char *fmt, ...)
{
int msglen;
char msgbuf[ENX_MAX_LINE];
char newfmt[ENX_MAX_LINE];
return;
if (msglen > 0) {
}
}
void
eibnx_dprintf_crit(const char *fmt, ...)
{
int msglen;
char msgbuf[ENX_MAX_LINE];
return;
if (msglen > 0) {
}
}