7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * CDDL HEADER START
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * The contents of this file are subject to the terms of the
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Common Development and Distribution License (the "License").
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * You may not use this file except in compliance with the License.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * See the License for the specific language governing permissions
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * and limitations under the License.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * When distributing Covered Code, include this CDDL HEADER in each
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * If applicable, add the following below this CDDL HEADER, with the
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * fields enclosed by brackets "[]" replaced with your own identifying
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * information: Portions Copyright [yyyy] [name of copyright owner]
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * CDDL HEADER END
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Use is subject to license terms.
0eb822a1c0c2bea495647510b75f77f0e57633ebcinditf_info_new(topo_mod_t *mp, xmlDocPtr doc, xmlChar *scheme)
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi if ((r = topo_mod_zalloc(mp, sizeof (tf_info_t))) == NULL)
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi if ((r->tf_scheme = topo_mod_strdup(mp, (char *)scheme)) == NULL) {
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi return (r);
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecinditf_rdata_new(topo_mod_t *mp, tf_info_t *xinfo, xmlNodePtr n, tnode_t *troot)
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi topo_dprintf(mp->tm_hdl, TOPO_DBG_XML, "new rdata\n");
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi if ((r = topo_mod_zalloc(mp, sizeof (tf_rdata_t))) == NULL) {
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi if ((name = xmlGetProp(n, (xmlChar *)Name)) == NULL) {
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi if ((r->rd_name = topo_mod_strdup(mp, (char *)name)) == NULL) {
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi if (r->rd_min < 0 || r->rd_max < 0 || r->rd_max < r->rd_min) {
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi return (r);
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecinditf_idata_new(topo_mod_t *mp, topo_instance_t i, tnode_t *tn)
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi topo_dprintf(mp->tm_hdl, TOPO_DBG_XML, "new idata %d\n", i);
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi if ((r = topo_mod_zalloc(mp, sizeof (tf_idata_t))) == NULL)
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi return (r);
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi return (0);
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi if (i == f->ti_i)
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi return (f);
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi topo_dprintf(mp->tm_hdl, TOPO_DBG_XML, "new pad p=%d, d=%d\n",
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi if ((r = topo_mod_zalloc(mp, sizeof (tf_pad_t))) == NULL)
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi return (r);
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi for (n = 0; n < p->tpad_pgcnt; n++)