topo_tree.c (4557a2a1) topo_tree.c (c93c462e)
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

--- 5 unchanged lines hidden (view full) ---

14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21/*
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

--- 5 unchanged lines hidden (view full) ---

14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21/*
22 * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
22 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
24 */
25
23 * Use is subject to license terms.
24 */
25
26#pragma ident "%Z%%M% %I% %E% SMI"
27
28/*
29 * Topology Trees
30 *
31 * Toplogy trees are instantiated for each builtin (FMRI) scheme specified
32 * in topo_builtin.c. Each ttree_t data structure contains the
33 * skeleton of the topology tree (scheme, root node, and file information).
34 * The root node of a topology does not represent any FMRI but rather serves
35 * as the entry point for topology access interfaces. The file information

--- 154 unchanged lines hidden (view full) ---

190 topo_dprintf(thp, TOPO_DBG_ERR, "no "
191 "topology map found for the %s "
192 "FMRI set\n", tp->tt_scheme);
193 }
194 }
195 }
196 }
197
26/*
27 * Topology Trees
28 *
29 * Toplogy trees are instantiated for each builtin (FMRI) scheme specified
30 * in topo_builtin.c. Each ttree_t data structure contains the
31 * skeleton of the topology tree (scheme, root node, and file information).
32 * The root node of a topology does not represent any FMRI but rather serves
33 * as the entry point for topology access interfaces. The file information

--- 154 unchanged lines hidden (view full) ---

188 topo_dprintf(thp, TOPO_DBG_ERR, "no "
189 "topology map found for the %s "
190 "FMRI set\n", tp->tt_scheme);
191 }
192 }
193 }
194 }
195
198 /*
199 * It would be nice to leave the devinfo and prominfo trees
200 * active but the interfaces consume copious amounts of memory
201 * while searching for property information
202 */
203 if (thp->th_di != DI_NODE_NIL) {
204 di_fini(thp->th_di);
205 thp->th_di = DI_NODE_NIL;
206 }
207 if (thp->th_pi != DI_PROM_HANDLE_NIL) {
208 di_prom_fini(thp->th_pi);
209 thp->th_pi = DI_PROM_HANDLE_NIL;
210 }
211
212 if (rv != 0)
213 return (topo_hdl_seterrno(thp, ETOPO_ENUM_NOMAP));
214
215 return (0);
216}
217
218int
219topo_tree_enum_all(topo_hdl_t *thp)

--- 14 unchanged lines hidden ---
196 if (rv != 0)
197 return (topo_hdl_seterrno(thp, ETOPO_ENUM_NOMAP));
198
199 return (0);
200}
201
202int
203topo_tree_enum_all(topo_hdl_t *thp)

--- 14 unchanged lines hidden ---