Lines Matching defs:shp

72 smbios_warn(smbios_hdl_t *shp, const char *format, ...)
80 if (shp != NULL) {
82 smbios_errmsg(smbios_errno(shp)));
191 check_oem(smbios_hdl_t *shp)
200 rv = smbios_lookup_type(shp, SMB_TYPE_OEMSTR, &s);
207 cnt = smbios_info_strtab(shp, oem_id, 0, NULL);
210 (void) smbios_info_strtab(shp, oem_id, cnt, oem_str);
275 print_smbios(smbios_hdl_t *shp, FILE *fp)
279 switch (smbios_info_smbios(shp, &ep)) {
309 print_bios(smbios_hdl_t *shp, FILE *fp)
313 (void) smbios_info_bios(shp, &b);
358 print_system(smbios_hdl_t *shp, FILE *fp)
363 (void) smbios_info_system(shp, &s);
381 print_bboard(smbios_hdl_t *shp, id_t id, FILE *fp)
386 (void) smbios_info_bboard(shp, id, &b);
403 cnt = smbios_info_contains(shp, id, chdl_cnt, chdl);
417 print_chassis(smbios_hdl_t *shp, id_t id, FILE *fp)
422 (void) smbios_info_chassis(shp, id, &c);
453 cnt = smbios_info_contains(shp, id, elem_cnt, elems);
477 print_processor(smbios_hdl_t *shp, id_t id, FILE *fp)
482 (void) smbios_info_processor(shp, id, &p);
587 print_cache(smbios_hdl_t *shp, id_t id, FILE *fp)
591 (void) smbios_info_cache(shp, id, &c);
636 print_port(smbios_hdl_t *shp, id_t id, FILE *fp)
640 (void) smbios_info_port(shp, id, &p);
656 print_slot(smbios_hdl_t *shp, id_t id, FILE *fp)
661 (void) smbios_info_slot(shp, id, &s);
662 smbios_info_smbios_version(shp, &v);
687 if (check_oem(shp) != 0 && !smbios_vergteq(&v, 2, 6))
703 if (smbios_info_slot_peers(shp, id, &npeers, &peer) != 0) {
704 smbios_warn(shp, "failed to read slot peer "
720 smbios_info_slot_peers_free(shp, npeers, peer);
725 print_obdevs_ext(smbios_hdl_t *shp, id_t id, FILE *fp)
731 (void) smbios_info_obdevs_ext(shp, id, &oe);
751 print_obdevs(smbios_hdl_t *shp, id_t id, FILE *fp)
756 if ((argc = smbios_info_obdevs(shp, id, 0, NULL)) > 0) {
758 (void) smbios_info_obdevs(shp, id, argc, argv);
765 print_strtab(smbios_hdl_t *shp, id_t id, FILE *fp)
770 if ((argc = smbios_info_strtab(shp, id, 0, NULL)) > 0) {
772 (void) smbios_info_strtab(shp, id, argc, argv);
779 print_lang(smbios_hdl_t *shp, id_t id, FILE *fp)
783 (void) smbios_info_lang(shp, &l);
790 print_strtab(shp, id, fp);
795 print_evlog(smbios_hdl_t *shp, id_t id, FILE *fp)
800 (void) smbios_info_eventlog(shp, &ev);
882 print_memarray(smbios_hdl_t *shp, id_t id, FILE *fp)
886 (void) smbios_info_memarray(shp, id, &ma);
904 print_memdevice(smbios_hdl_t *shp, id_t id, FILE *fp)
908 (void) smbios_info_memdevice(shp, id, &md);
1056 print_memarrmap(smbios_hdl_t *shp, id_t id, FILE *fp)
1060 (void) smbios_info_memarrmap(shp, id, &ma);
1070 print_memdevmap(smbios_hdl_t *shp, id_t id, FILE *fp)
1074 (void) smbios_info_memdevmap(shp, id, &md);
1088 print_hwsec(smbios_hdl_t *shp, FILE *fp)
1092 (void) smbios_info_hwsec(shp, &h);
1105 print_vprobe(smbios_hdl_t *shp, id_t id, FILE *fp)
1109 if (smbios_info_vprobe(shp, id, &vp) != 0) {
1110 smbios_warn(shp, "failed to read voltage probe information");
1168 print_cooldev(smbios_hdl_t *shp, id_t id, FILE *fp)
1172 if (smbios_info_cooldev(shp, id, &cd) != 0) {
1173 smbios_warn(shp, "failed to read cooling device "
1197 print_tprobe(smbios_hdl_t *shp, id_t id, FILE *fp)
1201 if (smbios_info_tprobe(shp, id, &tp) != 0) {
1202 smbios_warn(shp, "failed to read temperature probe "
1262 print_iprobe(smbios_hdl_t *shp, id_t id, FILE *fp)
1266 if (smbios_info_iprobe(shp, id, &ip) != 0) {
1267 smbios_warn(shp, "failed to read current probe information");
1326 print_boot(smbios_hdl_t *shp, FILE *fp)
1330 (void) smbios_info_boot(shp, &b);
1342 print_ipmi(smbios_hdl_t *shp, FILE *fp)
1346 (void) smbios_info_ipmi(shp, &i);
1365 print_powersup(smbios_hdl_t *shp, id_t id, FILE *fp)
1369 if (smbios_info_powersup(shp, id, &p) != 0) {
1370 smbios_warn(shp, "failed to read power supply information");
1406 print_extprocessor(smbios_hdl_t *shp, id_t id, FILE *fp)
1411 if (check_oem(shp) != 0)
1414 (void) smbios_info_extprocessor(shp, id, &ep);
1427 print_extport(smbios_hdl_t *shp, id_t id, FILE *fp)
1431 if (check_oem(shp) != 0)
1434 (void) smbios_info_extport(shp, id, &epo);
1444 print_pciexrc(smbios_hdl_t *shp, id_t id, FILE *fp)
1448 if (check_oem(shp) != 0)
1451 (void) smbios_info_pciexrc(shp, id, &pcie);
1458 print_extmemarray(smbios_hdl_t *shp, id_t id, FILE *fp)
1462 if (check_oem(shp) != 0)
1465 (void) smbios_info_extmemarray(shp, id, &em);
1473 print_extmemdevice(smbios_hdl_t *shp, id_t id, FILE *fp)
1478 if (check_oem(shp) != 0)
1481 (void) smbios_info_extmemdevice(shp, id, &emd);
1493 print_struct(smbios_hdl_t *shp, const smbios_struct_t *sp, void *fp)
1529 if (smbios_info_common(shp, sp->smbstr_id, &info) == 0) {
1537 print_bios(shp, fp);
1541 print_system(shp, fp);
1545 print_bboard(shp, sp->smbstr_id, fp);
1549 print_chassis(shp, sp->smbstr_id, fp);
1553 print_processor(shp, sp->smbstr_id, fp);
1557 print_cache(shp, sp->smbstr_id, fp);
1561 print_port(shp, sp->smbstr_id, fp);
1565 print_slot(shp, sp->smbstr_id, fp);
1569 print_obdevs(shp, sp->smbstr_id, fp);
1574 print_strtab(shp, sp->smbstr_id, fp);
1578 print_lang(shp, sp->smbstr_id, fp);
1582 print_evlog(shp, sp->smbstr_id, fp);
1586 print_memarray(shp, sp->smbstr_id, fp);
1590 print_memdevice(shp, sp->smbstr_id, fp);
1594 print_memarrmap(shp, sp->smbstr_id, fp);
1598 print_memdevmap(shp, sp->smbstr_id, fp);
1602 print_hwsec(shp, fp);
1606 print_vprobe(shp, sp->smbstr_id, fp);
1610 print_cooldev(shp, sp->smbstr_id, fp);
1614 print_tprobe(shp, sp->smbstr_id, fp);
1618 print_iprobe(shp, sp->smbstr_id, fp);
1622 print_boot(shp, fp);
1626 print_ipmi(shp, fp);
1630 print_powersup(shp, sp->smbstr_id, fp);
1634 print_obdevs_ext(shp, sp->smbstr_id, fp);
1638 print_extprocessor(shp, sp->smbstr_id, fp);
1642 print_extport(shp, sp->smbstr_id, fp);
1646 print_pciexrc(shp, sp->smbstr_id, fp);
1650 print_extmemarray(shp, sp->smbstr_id, fp);
1654 print_extmemdevice(shp, sp->smbstr_id, fp);
1730 smbios_hdl_t *shp;
1788 if ((shp = smbios_open(ifile, SMB_VERSION, oflags, &err)) == NULL) {
1795 smbios_truncated(shp))
1804 } else if (smbios_write(shp, fd) != 0) {
1806 g_pname, ofile, smbios_errmsg(smbios_errno(shp)));
1809 smbios_close(shp);
1814 print_smbios(shp, stdout);
1815 smbios_close(shp);
1823 err = smbios_lookup_id(shp, opt_i, &s);
1825 err = smbios_iter(shp, print_struct, stdout);
1829 g_pname, smbios_errmsg(smbios_errno(shp)));
1830 smbios_close(shp);
1835 (void) print_struct(shp, &s, stdout);
1837 smbios_close(shp);