printf.c revision b3a7691da42408392718e2d2dbae9efa7fed49d3
/*
* 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 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*
* Copyright 2012 Nexenta Systems, Inc. All rights reserved.
*/
#include <sys/sysmacros.h>
/*
* In some debugging situations it's useful to log all messages to panicbuf,
* which is persistent across reboots (on most platforms). The range
* panicbuf[panicbuf_log..PANICBUFSIZE-1] may be used for this purpose.
* By default, panicbuf_log == PANICBUFSIZE and no messages are logged.
* To enable panicbuf logging, set panicbuf_log to a small value, say 1K;
* this will reserve 1K for panic information and 7K for message logging.
*/
static void
{
char buf[LOG_MSGSIZE];
int s, on_intr;
s = splhi();
splx(s);
if (fmt[0] == '^')
sl |= SL_CONSONLY;
else if (fmt[0] == '!' ||
fmt++;
}
}
"%s: [ID %u FACILITY_AND_PRIORITY] ",
goto out;
}
goto retry;
}
goto out;
}
}
}
} else {
}
out:
do {
if (new >= PANICBUFSIZE)
}
}
void
{
zoneid);
}
void
{
}
/*PRINTFLIKE1*/
void
{
}
/*PRINTFLIKE2*/
void
{
zoneid);
}
void
{
/* Message the user tty, if any, and the global zone syslog */
/* Now message the local zone syslog */
if (!INGLOBALZONE(curproc))
}
/*PRINTFLIKE1*/
void
{
}
void
{
zoneid);
}
void
{
}
/*PRINTFLIKE2*/
void
{
}
/*PRINTFLIKE3*/
void
{
}
/*PRINTFLIKE3*/
void
{
char buf[LOG_MSGSIZE];
}
int
assfail(const char *a, const char *f, int l)
{
if (aask) {
printf("ASSERTION CAUGHT: %s, file: %s, line: %d", a, f, l);
}
panic("assertion failed: %s, file: %s, line: %d", a, f, l);
return (0);
}
void
const char *f, int l)
{
if (aask) {
printf("ASSERTION CAUGHT: %s (0x%llx %s 0x%llx), file: %s, "
f, l);
}
panic("assertion failed: %s (0x%llx %s 0x%llx), file: %s, "
f, l);
}
int
{
}
return (1);
}
int
{
return (1);
}