scheme.c revision 35f59e50e9ef37e6f1bd3b018289d678d5551cab
/*
* 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
*/
/*
*/
#include <strings.h>
#include <fm/fmd_fmri.h>
#include <fm/topo_mod.h>
int
fmd_fmri_init(void)
{
return (0);
}
void
fmd_fmri_fini(void)
{
}
{
int err;
char *str;
return (fmd_fmri_set_errno(EINVAL));
return (fmd_fmri_set_errno(EINVAL));
return (fmd_fmri_set_errno(EINVAL));
}
else
return (len);
}
int
{
char *nm;
if (err != 0)
return (fmd_fmri_set_errno(EINVAL));
if (err != 0)
return (fmd_fmri_set_errno(EINVAL));
return (fmd_fmri_set_errno(EINVAL));
return (present);
}
int
{
char *nm;
if (err != 0)
return (fmd_fmri_set_errno(EINVAL));
if (err != 0)
return (fmd_fmri_set_errno(EINVAL));
return (fmd_fmri_set_errno(EINVAL));
return (replaced);
}
int
{
char *nm;
return (0);
return (fmd_fmri_set_errno(EINVAL));
}
static int
{
const char *names[] = {
};
const char **namep;
return (0);
return (1);
continue;
return (1);
}
return (0);
}
static int
{
uint_t i;
return (0);
for (i = 0; i < erhclsz; i++) {
&erval);
&eeval);
return (0);
&erval);
&eeval);
return (0);
}
return (1);
}
static int
{
return (fmd_fmri_set_errno(EINVAL));
&h1sz);
&h2sz);
rc = 0;
}
return (rc);
}
int
{
return (fmd_fmri_set_errno(EINVAL));
/*
* Check ee is further down the hc tree than er; er and ee have
* the same auth and are on the same fru.
*/
return (0);
/*
* return true if er is parent of ee, or er is not a page
*/
FM_FMRI_HC_SPECIFIC_OFFSET, &eroff) != 0 &&
&eroff) != 0))
return (1);
/*
* special case for page fmri: return true if ee is the same page
*/
return (1);
return (0);
}
int
{
int err, service_state;
return (fmd_fmri_set_errno(EINVAL));
return (fmd_fmri_set_errno(EINVAL));
err = 0;
if (err != 0)
return (FMD_SERVICE_STATE_UNKNOWN);
else
return (service_state);
}