/*
* 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
*/
/*
*/
/*
* Create a generic topology node.
*/
#include <strings.h>
#include <fm/topo_mod.h>
#include <x86pi_impl.h>
/*
* Create a generic topo node based on the hcfmri strcuture passed in.
*/
int
{
int rv;
int err;
if (t_bindparent == NULL) {
"%s called with NULL parent for type %s\n",
return (-1);
}
/* Create the FMRI for this node */
"%s failed to create %s fmri : %s\n", _ENUM_NAME,
return (-1);
}
}
/* Bind this node to the parent */
"%s failed to bind %s node instance %d: %s\n",
return (-1);
}
/* call IPMI facility provider to register fac methods */
return (-1);
}
if (rv != 0) {
return (-1);
}
/* invoke fac_prov_ipmi_enum method */
/* log the error and drive on */
"%s: TOPO_METH_FAC_ENUM failed\n", _ENUM_NAME);
} else {
fac_done = 1;
}
}
topo_node_name(*t_node));
return (0);
}
tnode_t *
{
int result;
char *f = "x86pi_node_bind";
"%s: NULL parent for %s node instance %d\n",
return (NULL);
}
/* Bind this node to the parent */
"%s: failed to bind %s node instance %d: %s\n",
return (NULL);
}
/*
* We have bound the node. Now decorate it with an appropriate
* FRU and label (which may be inherited from the parent).
*/
if (result != 0) {
/*
* Though we have failed to set the FRU FMRI we still continue.
* The module errno is set by the called routine, so we report
* the problem and move on.
*/
"%s: failed to set FRU FMRI for %s node\n",
}
t_node);
if (result != 0) {
/*
* Though we have failed to set the label, we still continue.
* The module errno is set by the called routine, so we report
* the problem and move on.
*/
}
if (result != 0) {
/*
* Though we have failed to set the authority, we still
* continue. The module errno is set by the called routine, so
* we report the problem and move on.
*/
"%s: no authority information for %s node\n",
}
if (result != 0) {
/*
* Though we have failed to set the system group, we still
* continue. The module errno is set by the called routine, so
* we report the problem and move on.
*/
"%s: no system information for %s node\n",
}
return (t_node);
}