Lines Matching refs:mp

34 tf_info_new(topo_mod_t *mp, xmlDocPtr doc, xmlChar *scheme)
38 if ((r = topo_mod_zalloc(mp, sizeof (tf_info_t))) == NULL) {
39 (void) topo_mod_seterrno(mp, ETOPO_NOMEM);
43 if ((r->tf_scheme = topo_mod_strdup(mp, (char *)scheme)) == NULL) {
44 tf_info_free(mp, r);
45 (void) topo_mod_seterrno(mp, ETOPO_NOMEM);
53 tf_info_free(topo_mod_t *mp, tf_info_t *p)
58 topo_mod_strfree(mp, p->tf_scheme);
59 tf_rdata_free(mp, p->tf_rd);
60 topo_mod_free(mp, p, sizeof (tf_info_t));
64 tf_rdata_new(topo_mod_t *mp, tf_info_t *xinfo, xmlNodePtr n, tnode_t *troot)
70 topo_dprintf(mp->tm_hdl, TOPO_DBG_XML, "new rdata\n");
71 if ((r = topo_mod_zalloc(mp, sizeof (tf_rdata_t))) == NULL) {
72 (void) topo_mod_seterrno(mp, ETOPO_NOMEM);
77 (void) topo_mod_seterrno(mp, ETOPO_PRSR_NOATTR);
80 if ((r->rd_name = topo_mod_strdup(mp, (char *)name)) == NULL) {
81 (void) topo_mod_seterrno(mp, ETOPO_NOMEM);
84 if (xmlattr_to_int(mp, n, Min, &ui) < 0)
87 if (xmlattr_to_int(mp, n, Max, &ui) < 0)
91 (void) topo_mod_seterrno(mp, ETOPO_PRSR_BADRNG);
95 r->rd_mod = mp;
97 if (topo_xml_range_process(mp, n, r) < 0)
106 tf_rdata_free(mp, r);
111 tf_rdata_free(topo_mod_t *mp, tf_rdata_t *p)
115 tf_rdata_free(mp, p->rd_next);
117 topo_mod_strfree(mp, p->rd_name);
118 tf_edata_free(mp, p->rd_einfo);
119 tf_idata_free(mp, p->rd_instances);
120 tf_pad_free(mp, p->rd_pad);
121 topo_mod_free(mp, p, sizeof (tf_rdata_t));
125 tf_idata_new(topo_mod_t *mp, topo_instance_t i, tnode_t *tn)
129 topo_dprintf(mp->tm_hdl, TOPO_DBG_XML, "new idata %d\n", i);
130 if ((r = topo_mod_zalloc(mp, sizeof (tf_idata_t))) == NULL)
138 tf_idata_free(topo_mod_t *mp, tf_idata_t *p)
142 tf_idata_free(mp, p->ti_next);
143 tf_pad_free(mp, p->ti_pad);
144 topo_mod_free(mp, p, sizeof (tf_idata_t));
177 tf_pad_new(topo_mod_t *mp, int pcnt, int dcnt)
181 topo_dprintf(mp->tm_hdl, TOPO_DBG_XML, "new pad p=%d, d=%d\n",
183 if ((r = topo_mod_zalloc(mp, sizeof (tf_pad_t))) == NULL)
191 tf_pad_free(topo_mod_t *mp, tf_pad_t *p)
200 topo_mod_free(mp,
203 tf_rdata_free(mp, p->tpad_child);
204 tf_rdata_free(mp, p->tpad_sibs);
205 topo_mod_free(mp, p, sizeof (tf_pad_t));
209 tf_edata_free(topo_mod_t *mp, tf_edata_t *p)
215 topo_mod_free(mp, p, sizeof (tf_edata_t));