/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <strings.h>
#include <string.h>
#include <errno.h>
#include <syslog.h>
#include <libnvpair.h>
#include <stdarg.h>
#include <assert.h>
#include <dlfcn.h>
#include <signal.h>
#include <pcidr.h>
/*
* How dpritab is used:
* dpritab[dlvl_t value] = corresponding syslog priority
*
* Be careful of some priorities (facility + severity) that get "lost" by
* default since they have no syslog.conf entries such as daemon.info and
* daemon.debug; see syslog(3C) and syslog.conf(4) for more info
*/
/*
* the following affects pcidr_set_logopt() which plugins should use to set
* these logging options received from the handler
*/
void *
{
int i = 0;
void *buf;
errno = 0;
return (buf);
for (i = 0; i < PCIDR_MALLOC_CNT; i++) {
(void) usleep(PCIDR_MALLOC_TIME);
errno = 0;
return (buf);
}
/* exit() in case assertions are disabled (NDEBUG defined) */
return (NULL);
}
void
{
char *buf;
return;
/*LINTED*/
if (buflen <= 0)
return;
buflen++;
/*LINTED*/
if (rv <= 0) {
return;
}
#ifdef DEBUG
if (dsys != 0)
#endif
}
void
{
}
/*
* if <name> is recognized, function will return its type through <typep> and
* return 0; else function will return non-zero
*/
int
{
/* string type */
return (0);
}
return (1);
}
void
{
int rv;
prestr = "";
switch (type) {
case DATA_TYPE_STRING:
if (rv != 0) {
"failed: name = %s, rv = %d\n",
continue;
}
break;
default:
continue;
}
}
}
/*
* if one of the args matches <valstr>, return 0; else return non-zero
* args list must be NULL terminated;
* if args list is empty, this will return 0 if <valstr> is NOT empty
*/
int
{
int rv;
char *argstr;
rv = 1;
if (valstr[0] != '\0')
rv = 0;
goto OUT;
}
rv = 0;
break;
}
}
OUT:
return (rv);
}
/*
* dr attribute values that the default plugin checks for;
* other plugins may also use this if they support a superset of these
* values.
* returns 0 if valid, else non-zero
*/
int
{
int rv = 0;
name = ATTRNM_CLASS;
rv = 1;
}
rv = 1;
}
rv = 1;
}
name = DR_REQ_TYPE;
NULL) != 0) {
rv = 1;
}
rv = 1;
}
return (rv);
}
/*
* get dr attributes from <listp> for the default plugin and returns
* them through <drp>;
* returns 0 on success
*/
int
{
char *name;
int r, rv = 0;
name = ATTRNM_CLASS;
if (r != 0) {
rv = r;
}
if (r != 0) {
rv = r;
}
if (r != 0) {
rv = r;
}
name = DR_REQ_TYPE;
if (r != 0) {
rv = r;
}
if (r != 0) {
rv = r;
}
return (rv);
}