/*
* 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.
*/
/*
* Streams log driver. See log(7D).
*/
/* ARGSUSED */
static int
{
switch (infocmd) {
case DDI_INFO_DEVT2DEVINFO:
return (DDI_SUCCESS);
case DDI_INFO_DEVT2INSTANCE:
*result = 0;
return (DDI_SUCCESS);
}
return (DDI_FAILURE);
}
/* ARGSUSED */
static int
{
return (DDI_FAILURE);
}
return (DDI_SUCCESS);
}
/*
*
* its cache.
*
* creation. log_alloc() finds the zone's next available minor device.
*
* On entry devp's minor number indicates which device (log or conslog), on
* successful return it is the device instance.
*/
/* ARGSUSED */
static int
{
return (ENXIO);
case LOG_CONSMIN: /* clone open of /dev/conslog */
return (EINVAL); /* write-only device */
if (q->q_ptr)
return (0);
break;
case LOG_LOGMIN: /* clone open of /dev/log */
break;
default:
return (ENXIO);
}
return (ENXIO);
qprocson(q);
return (0);
}
/* ARGSUSED */
static int
{
qprocsoff(q);
return (0);
}
static int
{
/*
* Default to global zone if dblk doesn't have a valid cred.
* Calls to syslog() go through putmsg(), which does set up
* the cred.
*/
case M_FLUSH:
}
return (0);
}
break;
case M_IOCTL:
/* write-only device */
return (0);
}
return (0);
}
return (0);
}
case I_CONSLOG:
break;
case I_TRCLOG:
return (0);
}
break;
case I_ERRLOG:
break;
default:
return (0);
}
return (0);
case M_PROTO:
/* This code is used by savecore to log dump msgs */
return (0);
}
}
break;
case M_DATA:
break;
}
return (0);
}
static int
{
if (log_msgid == 0) {
/*
* Strip out the message ID. If it's a kernel
* SL_CONSOLE message, replace msgid with "unix: ".
*/
7, "unix: ");
}
}
}
return (0);
}
int
_init()
{
return (mod_install(&modlinkage));
}
int
_fini()
{
return (mod_remove(&modlinkage));
}
int
{
}