/*
* 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.
*/
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <strings.h>
#include <libnvpair.h>
#include <fm/topo_mod.h>
static char *
{
char *fmtstr;
int ret;
return (NULL);
}
return (NULL);
}
return (fmtstr);
}
static int
{
}
nvlist_free(*out);
}
!= 0) {
nvlist_free(*out);
}
if (type == TOPO_TYPE_STRING) {
!= 0) {
nvlist_free(*out);
}
} else if (type == TOPO_TYPE_FMRI) {
!= 0) {
nvlist_free(*out);
}
} else if (type == TOPO_TYPE_UINT32) {
!= 0) {
nvlist_free(*out);
}
}
return (0);
}
/*
* This is a somewhat generic property method for labelling the PSU and fan
* FRU's that we're enumerating. It takes the following three arguments:
*
* format: a string containing a printf-like format with a two %d tokens
* for the cpu and dimm slot label numbers, which this method
* computes
*
* i.e.: Fan %d
*
* offset: a numeric offset that we'll number the FRU's from. This is to
* allow for the fact that some systems may number the FRU's
* from zero while others may start from one
*/
/* ARGSUSED */
int
{
int ret;
}
}
/* topo errno already set */
return (-1);
}
/* LINTED: E_SEC_PRINTF_VAR_FMT */
!= 0) {
/* topo errno already set */
return (-1);
}
return (0);
}
/*
* This is a somewhat generic property method for attaching a FRU fmri onto
* a power supply or fan based on the assumption that the FRU will either be
*
* entity: either "self" or "parent"
*/
/* ARGSUSED */
int
{
char *entity;
}
}
return (-1);
return (-1);
} else {
}
/* topo errno already set */
return (-1);
}
return (0);
}