/*
* 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"
#include <stddef.h>
#include <stdio.h>
#include <string.h>
#include <libnvpair.h>
#include "ses2_impl.h"
static int
{
int nverr;
dip->sdsi_report);
dip->sdsi_ident);
return (0);
}
static int
{
int nverr;
pip->spsi_ident);
pip->spsi_dc_fail);
pip->spsi_ac_fail);
pip->spsi_hot_swap);
return (0);
}
static int
{
int nverr;
cip->scsi_ident);
return (0);
}
static int
{
int nverr;
tip->stsi_ut_warn);
tip->stsi_ut_fail);
tip->stsi_ot_warn);
tip->stsi_ot_fail);
return (0);
}
static int
{
int nverr;
lip->slsi_ident);
lip->slsi_unlocked);
return (0);
}
static int
{
int nverr;
aip->sasi_ident);
aip->sasi_unrecov);
aip->sasi_noncrit);
aip->sasi_remind);
aip->sasi_muted);
return (0);
}
static int
{
int nverr;
cip->scsi_report);
cip->scsi_hot_swap);
return (0);
}
static int
{
int nverr;
sip->sss_report);
return (0);
}
static int
{
int nverr;
np->snsi_ident);
return (0);
}
static int
{
int nverr;
uip->susi_ups_fail);
uip->susi_dc_fail);
uip->susi_ac_fail);
uip->susi_ac_qual);
uip->susi_ac_hi);
uip->susi_ac_lo);
return (0);
}
static int
{
int nverr;
return (0);
}
static int
{
int nverr;
return (0);
}
static int
{
int nverr;
pip->spsi_report);
pip->spsi_disabled);
return (0);
}
static int
{
int nverr;
lip->slsi_ident);
return (0);
}
static int
{
int nverr;
cip->scsi_ident);
cip->scsi_disabled);
return (0);
}
static int
{
int nverr;
return (0);
}
static int
{
int nverr;
return (0);
}
static int
{
int nverr;
iip->sisi_ident);
iip->sisi_report);
iip->sisi_enabled);
return (0);
}
static int
{
int nverr;
return (0);
}
static int
{
int nverr;
aip->sadsi_rebuild);
aip->sadsi_report);
return (0);
}
static int
{
int nverr;
return (0);
}
static int
{
int nverr;
return (0);
}
static const struct status_parser {
} status_parsers[] = {
{ SES_ET_UPS, elem_parse_ups },
};
static int
{
int nverr;
return (0);
&type) == 0);
return (0);
}
static int
{
char *desc;
int nverr;
return (0);
return (0);
}
static int
{
int nverr, i;
int nports;
return (0);
sadfi_ports)) / sizeof (ses2_aes_port_descr_impl_t));
if (nports == 0)
return (0);
return (-1);
for (i = 0; i < nports; i++) {
goto fail;
goto fail;
goto fail;
if (nverr != 0)
goto fail;
goto fail;
}
goto fail;
nvlist_free(nva[i]);
return (0);
fail:
nvlist_free(nva[i]);
}
static int
{
int nverr, i;
} else {
}
if (dep->sadei_invalid)
return (0);
return (0);
return (0);
}
return (0);
sadsi_phys)) / sizeof (ses2_aes_phy0_descr_impl_t));
} else {
sadsi_phys)) / sizeof (ses2_aes_phy0_descr_impl_t));
}
if (nphy == 0)
return (0);
return (-1);
for (i = 0; i < nphy; i++) {
goto fail;
pp->sapdi_device_type)) != 0)
goto fail;
goto fail;
goto fail;
goto fail;
goto fail;
goto fail;
goto fail;
goto fail;
if (nverr != 0)
goto fail;
if (nverr != 0)
goto fail;
pp->sapdi_phy_identifier)) != 0)
goto fail;
}
goto fail;
nvlist_free(nva[i]);
return (0);
fail:
nvlist_free(nva[i]);
}
static int
{
int nverr, i;
if (dep->sadei_invalid)
return (0);
/*
* This should never happen; no current SAS expander can have any
* other kind of ports. But maybe someday - one could envision a
* SAS expander with iSCSI target ports, for example.
*/
return (0);
return (0);
sadei_phys)) / sizeof (ses2_aes_exp_phy_descr_impl_t));
if (nphy == 0)
return (0);
return (-1);
for (i = 0; i < nphy; i++) {
goto fail;
goto fail;
goto fail;
}
goto fail;
nvlist_free(nva[i]);
return (0);
fail:
nvlist_free(nva[i]);
}
static int
{
int nverr, i;
if (dep->sadei_invalid)
return (0);
return (0);
return (0);
}
return (0);
sadsi_phys)) / sizeof (ses2_aes_phy1_descr_impl_t));
return (-1);
for (i = 0; i < nphy; i++) {
goto fail;
goto fail;
goto fail;
goto fail;
}
goto fail;
nvlist_free(nva[i]);
return (0);
fail:
nvlist_free(nva[i]);
return (nverr);
}
static const struct aes_parser {
} aes_parsers[] = {
};
static int
{
return (0);
&type) == 0);
break;
return (0);
return (0);
}
static int
{
int nverr;
&type) == 0);
switch (type) {
case SES_ET_UPS:
case SES_ET_VOLTAGE_SENSOR:
case SES_ET_CURRENT_SENSOR:
break;
default:
return (0);
}
return (0);
tp->sti_high_crit);
tp->sti_high_warn);
tp->sti_low_crit);
tp->sti_low_warn);
return (0);
}
int
{
int err;
return (err);
return (err);
return (err);
return (err);
return (0);
}