/illumos-gate/usr/src/lib/fm/topo/libtopo/common/ |
H A D | topo_snap.c | 135 thp->th_product = topo_cleanup_auth_str(thp, in topo_hdl_set_product() 154 thp->th_product = topo_hdl_strdup(thp, thp->th_platform); in topo_hdl_set_product() 220 thp->th_rootdir = topo_hdl_strdup(thp, rpath); in topo_open() 228 thp->th_platform = topo_hdl_strdup(thp, platform); in topo_open() 229 thp->th_isa = topo_hdl_strdup(thp, isa); in topo_open() 261 topo_hdl_strfree(thp, thp->th_platform); in topo_close() 263 topo_hdl_strfree(thp, thp->th_isa); in topo_close() 265 topo_hdl_strfree(thp, thp->th_machine); in topo_close() 267 topo_hdl_strfree(thp, thp->th_product); in topo_close() 269 topo_hdl_strfree(thp, thp->th_rootdir); in topo_close() [all …]
|
H A D | topo_fmri.c | 127 return (set_error(thp, ETOPO_NOMEM, err, in topo_fmri_nvl2str() 205 topo_hdl_nvdup(thp, out, fmri) != 0) in topo_fmri_str2nvl() 206 return (set_error(thp, ETOPO_FMRI_NVL, err, in topo_fmri_str2nvl() 459 return (set_error(thp, ETOPO_FMRI_NVL, err, in fmri_prop() 468 return (set_error(thp, ETOPO_FMRI_NVL, err, in fmri_prop() 499 if (topo_hdl_nvdup(thp, ap, asru) < 0) in topo_fmri_asru() 521 if (topo_hdl_nvdup(thp, fp, fru) < 0) in topo_fmri_fru() 615 return (set_error(thp, ETOPO_FMRI_NVL, err, in topo_fmri_setprop() 625 return (set_error(thp, ETOPO_FMRI_NVL, err, in topo_fmri_setprop() 661 return (set_error(thp, ETOPO_FMRI_NVL, err, in topo_fmri_getpgrp() [all …]
|
H A D | topo_module.c | 185 topo_hdl_t *thp; in topo_mod_destroy() local 190 thp = mod->tm_hdl; in topo_mod_destroy() 218 (void) topo_hdl_seterrno(thp, err); in set_create_error() 235 mod->tm_hdl = thp; in topo_mod_create() 242 mod->tm_rootdir = topo_hdl_strdup(thp, thp->th_rootdir); in topo_mod_create() 247 mod->tm_alloc = thp->th_alloc; in topo_mod_create() 261 topo_modhash_create(topo_hdl_t *thp) in topo_modhash_create() argument 277 thp->th_modhash = mhp; in topo_modhash_create() 294 thp->th_modhash = NULL; in topo_modhash_destroy() 344 topo_hdl_t *thp = mod->tm_hdl; in topo_modhash_unload() local [all …]
|
H A D | topo_digraph_xml.c | 455 topo_hdl_strfree(thp, fmristr); in serialize_edge() 525 topo_hdl_strfree(thp, val); in serialize_property() 856 dump_xml_node(thp, cn); in deserialize_edges() 906 dump_xml_node(thp, xn); in add_edges() 1175 topo_hdl_free(thp, arr, in deserialize_nvpair() 1216 topo_hdl_free(thp, arr, in deserialize_nvpair() 1256 topo_hdl_free(thp, arr, in deserialize_nvpair() 1297 topo_hdl_free(thp, arr, in deserialize_nvpair() 1319 dump_xml_node(thp, xn); in deserialize_nvpair() 1366 dump_xml_node(thp, xn); in deserialize_vertex() [all …]
|
H A D | topo_tree.c | 76 (void) topo_hdl_seterrno(thp, err); in set_create_error() 111 rp->tn_hdl = thp; in topo_tree_create() 116 tp->tt_walk->tw_thp = thp; in topo_tree_create() 153 topo_tree_enum(topo_hdl_t *thp, ttree_t *tp) in topo_tree_enum() argument 169 if ((pp = strchr(thp->th_product, ',')) == NULL) in topo_tree_enum() 170 pp = thp->th_product; in topo_tree_enum() 176 pp = thp->th_platform; in topo_tree_enum() 183 thp->th_machine, tp->tt_scheme, 0) < 0) { in topo_tree_enum() 187 topo_dprintf(thp, TOPO_DBG_ERR, "no " in topo_tree_enum() 202 topo_tree_enum_all(topo_hdl_t *thp) in topo_tree_enum_all() argument [all …]
|
H A D | topo_builtin.c | 104 topo_builtin_create(topo_hdl_t *thp, const char *rootdir) in topo_builtin_create() argument 122 topo_dprintf(thp, TOPO_DBG_ERR, in topo_builtin_create() 125 topo_hdl_errmsg(thp)); in topo_builtin_create() 130 if ((tp = topo_tree_create(thp, mod, bp->bltin_name)) in topo_builtin_create() 132 topo_dprintf(thp, TOPO_DBG_ERR, "unable to " in topo_builtin_create() 134 bp->bltin_name, topo_hdl_errmsg(thp)); in topo_builtin_create() 137 topo_list_append(&thp->th_trees, tp); in topo_builtin_create() 144 topo_dprintf(thp, TOPO_DBG_ERR, "unable to " in topo_builtin_create() 146 bp->bltin_name, topo_hdl_errmsg(thp)); in topo_builtin_create() 149 topo_list_append(&thp->th_digraphs, tdg); in topo_builtin_create() [all …]
|
H A D | topo_digraph.c | 164 (void) topo_hdl_seterrno(thp, ETOPO_NOMEM); in topo_digraph_new() 171 (void) topo_hdl_seterrno(thp, ETOPO_NOMEM); in topo_digraph_new() 195 tn->tn_hdl = thp; in topo_digraph_new() 383 ret = func(thp, vtx, last_vtx, arg); in topo_vertex_iter() 470 ret = func(thp, edge, last_edge, arg); in topo_edge_iter() 569 (void) topo_hdl_seterrno(thp, ETOPO_NOMEM); in visit_vertex() 583 (void) topo_hdl_seterrno(thp, ETOPO_NOMEM); in visit_vertex() 621 topo_path_destroy(thp, path); in visit_vertex() 655 (void) topo_hdl_seterrno(thp, ETOPO_NOMEM); in topo_digraph_paths() 685 (void) topo_hdl_seterrno(thp, ETOPO_NOMEM); in topo_digraph_paths() [all …]
|
H A D | topo_subr.c | 45 topo_hdl_lock(topo_hdl_t *thp) in topo_hdl_lock() argument 51 topo_hdl_unlock(topo_hdl_t *thp) in topo_hdl_unlock() argument 150 topo_hdl_lock(thp); in topo_debug_set() 164 topo_hdl_unlock(thp); in topo_debug_set() 171 thp->th_dbout = dbp->tdm_mode; in topo_debug_set() 173 topo_hdl_unlock(thp); in topo_debug_set() 213 if (!(thp->th_debug & mask)) in topo_dprintf() 279 topo_hdl_t *thp = mod->tm_hdl; in topo_search_path() local 286 thp->th_platform, file); in topo_search_path() 289 thp->th_rootdir, thp->th_machine, file); in topo_search_path() [all …]
|
H A D | topo_2xml.c | 205 topo_hdl_strfree(thp, strbuf); in txml_print_prop() 221 topo_hdl_strfree(thp, fmristr); in txml_print_prop() 321 topo_hdl_strfreev(thp, val, nelem); in txml_print_prop() 339 if ((ret = topo_fmri_nvl2str(thp, val[i], in txml_print_prop() 344 topo_hdl_strfree(thp, fmristr); in txml_print_prop() 384 if (txml_print_range(thp, fp, node, 1) == 1) in txml_print_dependents() 410 txml_print_pgroup(thp, fp, node, pg); in txml_print_node() 412 txml_print_dependents(thp, fp, node); in txml_print_node() 460 const char *name = thp->th_product; in txml_print_topology() 464 (void) txml_print_range(thp, fp, node, 0); in txml_print_topology() [all …]
|
H A D | topo_prop.c | 213 topo_hdl_t *thp = node->tn_hdl; in prop_getval() local 348 topo_hdl_free(thp, a1[j], in prop_getval() 350 topo_hdl_free(thp, a1, in prop_getval() 373 topo_hdl_free(thp, a1, in prop_getval() 505 topo_hdl_t *thp = node->tn_hdl; in set_seterror() local 524 topo_hdl_t *thp = node->tn_hdl; in prop_create() local 555 pv->tp_hdl = thp; in prop_create() 1148 topo_hdl_free(thp, info, in topo_pgroup_info() 1322 topo_hdl_t *thp; in topo_propval_destroy() local 1327 thp = pv->tp_hdl; in topo_propval_destroy() [all …]
|
H A D | topo_string.c | 38 topo_hdl_strdup(topo_hdl_t *thp, const char *s) in topo_hdl_strdup() argument 43 p = topo_hdl_alloc(thp, strlen(s) + 1); in topo_hdl_strdup() 54 topo_hdl_strfree(topo_hdl_t *thp, char *s) in topo_hdl_strfree() argument 57 topo_hdl_free(thp, s, strlen(s) + 1); in topo_hdl_strfree() 61 topo_hdl_strfreev(topo_hdl_t *thp, char **strarr, uint_t nelem) in topo_hdl_strfreev() argument 64 topo_hdl_strfree(thp, strarr[i]); in topo_hdl_strfreev() 66 topo_hdl_free(thp, strarr, (nelem * sizeof (char *))); in topo_hdl_strfreev() 91 *str = topo_hdl_alloc(thp, len); in topo_hdl_vasprintf() 105 topo_hdl_free(thp, *str, len + 1); in topo_hdl_vasprintf() 114 topo_hdl_asprintf(topo_hdl_t *thp, char **str, const char *fmt, ...) in topo_hdl_asprintf() argument [all …]
|
/illumos-gate/usr/src/cmd/fm/schemes/dev/ |
H A D | scheme.c | 50 topo_hdl_t *thp; in fmd_fmri_nvl2str() local 57 fmd_fmri_topo_rele(thp); in fmd_fmri_nvl2str() 67 fmd_fmri_topo_rele(thp); in fmd_fmri_nvl2str() 76 topo_hdl_t *thp; in fmd_fmri_present() local 82 fmd_fmri_topo_rele(thp); in fmd_fmri_present() 91 topo_hdl_t *thp; in fmd_fmri_replaced() local 97 fmd_fmri_topo_rele(thp); in fmd_fmri_replaced() 107 topo_hdl_t *thp; in fmd_fmri_unusable() local 117 fmd_fmri_topo_rele(thp); in fmd_fmri_unusable() 130 topo_hdl_t *thp; in fmd_fmri_service_state() local [all …]
|
/illumos-gate/usr/src/cmd/fm/schemes/svc/ |
H A D | scheme.c | 49 topo_hdl_t *thp; in fmd_fmri_nvl2str() local 56 fmd_fmri_topo_rele(thp); in fmd_fmri_nvl2str() 66 fmd_fmri_topo_rele(thp); in fmd_fmri_nvl2str() 77 topo_hdl_t *thp; in fmd_fmri_present() local 86 fmd_fmri_topo_rele(thp); in fmd_fmri_present() 96 topo_hdl_t *thp; in fmd_fmri_replaced() local 105 fmd_fmri_topo_rele(thp); in fmd_fmri_replaced() 115 topo_hdl_t *thp; in fmd_fmri_service_state() local 125 fmd_fmri_topo_rele(thp); in fmd_fmri_service_state() 139 topo_hdl_t *thp; in fmd_fmri_unusable() local [all …]
|
/illumos-gate/usr/src/test/os-tests/tests/libtopo/ |
H A D | digraph-test.c | 159 topo_path_destroy(thp, paths[i]); in test_paths() 174 topo_path_destroy(thp, paths[i]); in test_paths() 193 topo_path_destroy(thp, paths[i]); in test_paths() 223 topo_hdl_t *thp = NULL; in main() local 267 topo_close(thp); in main() 283 if (test_paths(thp, tdg) != 0) { in main() 290 topo_close(thp); in main() 310 } else if (topo_hdl_errno(thp) == 0) { in main() 323 } else if (topo_hdl_errno(thp) == 0) { in main() 367 if (thp != NULL) { in main() [all …]
|
/illumos-gate/usr/src/cmd/fm/schemes/hc/ |
H A D | scheme.c | 47 topo_hdl_t *thp; in fmd_fmri_nvl2str() local 57 fmd_fmri_topo_rele(thp); in fmd_fmri_nvl2str() 67 fmd_fmri_topo_rele(thp); in fmd_fmri_nvl2str() 76 topo_hdl_t *thp; in fmd_fmri_present() local 91 fmd_fmri_topo_rele(thp); in fmd_fmri_present() 100 topo_hdl_t *thp; in fmd_fmri_replaced() local 115 fmd_fmri_topo_rele(thp); in fmd_fmri_replaced() 124 topo_hdl_t *thp; in fmd_fmri_unusable() local 137 fmd_fmri_topo_rele(thp); in fmd_fmri_unusable() 209 topo_hdl_t *thp; in fru_compare() local [all …]
|
/illumos-gate/usr/src/cmd/fm/fmtopo/common/ |
H A D | fmtopo.c | 150 topo_hdl_strfree(thp, aname); in print_node() 157 topo_hdl_strfree(thp, fname); in print_node() 163 topo_hdl_strfree(thp, lname); in print_node() 858 topo_hdl_strfree(thp, s); in walk_node() 863 topo_hdl_strfree(thp, s); in walk_node() 887 print_props(thp, node); in walk_node() 1219 if (thp != NULL) { in fmtopo_exit() 1220 topo_snap_release(thp); in fmtopo_exit() 1221 topo_close(thp); in fmtopo_exit() 1237 topo_hdl_t *thp = NULL; in main() local [all …]
|
/illumos-gate/usr/src/cmd/fm/schemes/mem/ |
H A D | mem.c | 153 topo_hdl_t *thp; in fmd_fmri_expand() local 164 fmd_fmri_topo_rele(thp); in fmd_fmri_expand() 216 struct topo_hdl *thp; in fmd_fmri_present() local 237 fmd_fmri_topo_rele(thp); in fmd_fmri_present() 293 fmd_fmri_topo_rele(thp); in fmd_fmri_present() 316 struct topo_hdl *thp; in fmd_fmri_replaced() local 337 fmd_fmri_topo_rele(thp); in fmd_fmri_replaced() 394 fmd_fmri_topo_rele(thp); in fmd_fmri_replaced() 418 struct topo_hdl *thp; in fmd_fmri_contains() local 428 fmd_fmri_topo_rele(thp); in fmd_fmri_contains() [all …]
|
/illumos-gate/usr/src/cmd/fm/schemes/cpu/ |
H A D | cpu.c | 46 topo_hdl_t *thp; in fmd_fmri_nvl2str() local 52 fmd_fmri_topo_rele(thp); in fmd_fmri_nvl2str() 59 topo_hdl_strfree(thp, str); in fmd_fmri_nvl2str() 60 fmd_fmri_topo_rele(thp); in fmd_fmri_nvl2str() 151 topo_hdl_t *thp; in fmd_fmri_expand() local 164 fmd_fmri_topo_rele(thp); in fmd_fmri_expand() 209 topo_hdl_t *thp; in fmd_fmri_present() local 221 fmd_fmri_topo_rele(thp); in fmd_fmri_present() 262 topo_hdl_t *thp; in fmd_fmri_replaced() local 274 fmd_fmri_topo_rele(thp); in fmd_fmri_replaced() [all …]
|
/illumos-gate/usr/src/cmd/prtdiag/i386/ |
H A D | smbios.c | 234 topo_hdl_strfree(thp, didstr); in do_slot_mapping_cb() 235 topo_hdl_strfree(thp, driver); in do_slot_mapping_cb() 236 topo_hdl_strfree(thp, vidstr); in do_slot_mapping_cb() 237 topo_hdl_strfree(thp, fmri); in do_slot_mapping_cb() 309 topo_hdl_t *thp; in do_prominfo() local 356 topo_close(thp); in do_prominfo() 357 thp = NULL; in do_prominfo() 398 topo_hdl_strfree(thp, uuid); in do_prominfo() 399 if (thp != NULL) { in do_prominfo() 400 topo_snap_release(thp); in do_prominfo() [all …]
|
/illumos-gate/usr/src/cmd/fm/modules/common/disk-monitor/ |
H A D | topo_gather.c | 217 topo_hdl_strfree(thp, cstr); in fmri2ptr() 272 topo_hdl_strfree(thp, label); in topo_add_disk() 290 topo_hdl_strfree(thp, devpath); in topo_add_disk() 300 topo_hdl_strfree(thp, devpath); in topo_add_disk() 327 topo_hdl_strfree(thp, model); in topo_add_disk() 329 topo_hdl_strfree(thp, manuf); in topo_add_disk() 331 topo_hdl_strfree(thp, serial); in topo_add_disk() 746 topo_hdl_t *thp; in update_configuration_from_topo() local 758 fmd_hdl_topo_rele(hdl, thp); in update_configuration_from_topo() 768 fmd_hdl_topo_rele(hdl, thp); in update_configuration_from_topo() [all …]
|
/illumos-gate/usr/src/lib/libzfs/common/ |
H A D | libzfs_fru.c | 142 _topo_hdl_strfree(thp, devpath); in libzfs_fru_gather() 147 _topo_hdl_strfree(thp, devpath); in libzfs_fru_gather() 156 _topo_hdl_strfree(thp, devpath); in libzfs_fru_gather() 166 _topo_hdl_strfree(thp, devpath); in libzfs_fru_gather() 167 _topo_hdl_strfree(thp, frustr); in libzfs_fru_gather() 176 _topo_hdl_strfree(thp, frustr); in libzfs_fru_gather() 180 _topo_hdl_strfree(thp, devpath); in libzfs_fru_gather() 181 _topo_hdl_strfree(thp, frustr); in libzfs_fru_gather() 268 topo_hdl_t *thp; in libzfs_fru_refresh() local 283 thp = hdl->libzfs_topo_hdl; in libzfs_fru_refresh() [all …]
|
/illumos-gate/usr/src/cmd/fm/modules/common/disk-lights/ |
H A D | disk_lights.c | 137 dl_fault_walk_inner(topo_hdl_t *thp, tnode_t *node, void *arg) in dl_fault_walk_inner() argument 147 get_facility_props(thp, node, &facname, &factype) != 0) { in dl_fault_walk_inner() 162 topo_hdl_strfree(thp, facname); in dl_fault_walk_inner() 163 topo_hdl_strfree(thp, factype); in dl_fault_walk_inner() 168 dl_fault_walk_outer(topo_hdl_t *thp, tnode_t *node, void *arg) in dl_fault_walk_outer() argument 203 (void) topo_node_child_walk(thp, pnode, dl_fault_walk_inner, &fwi, in dl_fault_walk_outer() 218 topo_hdl_t *thp = NULL; in dl_examine_topo() local 221 thp = fmd_hdl_topo_hold(dl->dl_fmd, TOPO_VERSION); in dl_examine_topo() 238 if (thp != NULL) in dl_examine_topo() 239 fmd_hdl_topo_rele(dl->dl_fmd, thp); in dl_examine_topo() [all …]
|
/illumos-gate/usr/src/cmd/fm/schemes/mod/ |
H A D | scheme.c | 35 topo_hdl_t *thp; in fmd_fmri_nvl2str() local 38 if ((thp = fmd_fmri_topo_hold(TOPO_VERSION)) == NULL) in fmd_fmri_nvl2str() 41 if (topo_fmri_nvl2str(thp, nvl, &str, &err) != 0) { in fmd_fmri_nvl2str() 42 fmd_fmri_topo_rele(thp); in fmd_fmri_nvl2str() 51 topo_hdl_strfree(thp, str); in fmd_fmri_nvl2str() 52 fmd_fmri_topo_rele(thp); in fmd_fmri_nvl2str()
|
/illumos-gate/usr/src/cmd/fm/schemes/pkg/ |
H A D | scheme.c | 35 topo_hdl_t *thp; in fmd_fmri_nvl2str() local 38 if ((thp = fmd_fmri_topo_hold(TOPO_VERSION)) == NULL) in fmd_fmri_nvl2str() 41 if (topo_fmri_nvl2str(thp, nvl, &str, &err) != 0) { in fmd_fmri_nvl2str() 42 fmd_fmri_topo_rele(thp); in fmd_fmri_nvl2str() 51 topo_hdl_strfree(thp, str); in fmd_fmri_nvl2str() 52 fmd_fmri_topo_rele(thp); in fmd_fmri_nvl2str()
|
/illumos-gate/usr/src/cmd/fm/schemes/sw/ |
H A D | scheme.c | 48 topo_hdl_t *thp; in fmd_fmri_nvl2str() local 51 if ((thp = fmd_fmri_topo_hold(TOPO_VERSION)) == NULL) in fmd_fmri_nvl2str() 54 if (topo_fmri_nvl2str(thp, nvl, &str, &err) != 0) { in fmd_fmri_nvl2str() 55 fmd_fmri_topo_rele(thp); in fmd_fmri_nvl2str() 64 topo_hdl_strfree(thp, str); in fmd_fmri_nvl2str() 65 fmd_fmri_topo_rele(thp); in fmd_fmri_nvl2str()
|