Lines Matching refs:stp
237 smb_info_strptr(const smb_struct_t *stp, uint8_t off, int *n) in smb_info_strptr() argument
239 const uint8_t *sp = (const uint8_t *)(uintptr_t)stp->smbst_hdr; in smb_info_strptr()
241 if (off != 0 && sp + off < stp->smbst_end) { in smb_info_strptr()
243 return (smb_strptr(stp, sp[off])); in smb_info_strptr()
246 return (smb_strptr(stp, 0)); in smb_info_strptr()
292 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_common() local
296 if (stp == NULL) in smbios_info_common()
300 if (isp->is_type == stp->smbst_hdr->smbh_type) in smbios_info_common()
304 ip->smbi_manufacturer = smb_info_strptr(stp, isp->is_manu, &n); in smbios_info_common()
305 ip->smbi_product = smb_info_strptr(stp, isp->is_product, &n); in smbios_info_common()
306 ip->smbi_version = smb_info_strptr(stp, isp->is_version, &n); in smbios_info_common()
307 ip->smbi_serial = smb_info_strptr(stp, isp->is_serial, &n); in smbios_info_common()
308 ip->smbi_asset = smb_info_strptr(stp, isp->is_asset, &n); in smbios_info_common()
309 ip->smbi_location = smb_info_strptr(stp, isp->is_location, &n); in smbios_info_common()
310 ip->smbi_part = smb_info_strptr(stp, isp->is_part, &n); in smbios_info_common()
339 ip->smbi_location = smb_info_strptr(stp, in smbios_info_common()
355 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_contains() local
362 if (stp == NULL) { in smbios_info_contains()
367 if (isp->is_type == stp->smbst_hdr->smbh_type) in smbios_info_contains()
374 cnt = *((uint8_t *)(uintptr_t)stp->smbst_hdr + isp->is_contc); in smbios_info_contains()
375 cp = (id_t *)((uintptr_t)stp->smbst_hdr + isp->is_contv); in smbios_info_contains()
391 const smb_struct_t *stp = smb_lookup_type(shp, SMB_TYPE_BIOS); in smbios_info_bios() local
394 if (stp == NULL) in smbios_info_bios()
397 if (stp->smbst_hdr->smbh_len < sizeof (smb_bios_t) - sizeof (uint8_t)) in smbios_info_bios()
400 bip = (smb_bios_t *)(uintptr_t)stp->smbst_hdr; in smbios_info_bios()
406 bp->smbb_vendor = smb_strptr(stp, bip->smbbi_vendor); in smbios_info_bios()
407 bp->smbb_version = smb_strptr(stp, bip->smbbi_version); in smbios_info_bios()
409 bp->smbb_reldate = smb_strptr(stp, bip->smbbi_reldate); in smbios_info_bios()
418 if (stp->smbst_hdr->smbh_len >= sizeof (smb_bios_t)) { in smbios_info_bios()
420 bp->smbb_nxcflags = stp->smbst_hdr->smbh_len - in smbios_info_bios()
480 return (stp->smbst_hdr->smbh_hdl); in smbios_info_bios()
486 const smb_struct_t *stp = smb_lookup_type(shp, SMB_TYPE_SYSTEM); in smbios_info_system() local
489 if (stp == NULL) in smbios_info_system()
492 smb_info_bcopy(stp->smbst_hdr, &si, sizeof (si)); in smbios_info_system()
495 sip->smbs_uuid = ((smb_system_t *)stp->smbst_hdr)->smbsi_uuid; in smbios_info_system()
498 sip->smbs_sku = smb_strptr(stp, si.smbsi_sku); in smbios_info_system()
499 sip->smbs_family = smb_strptr(stp, si.smbsi_family); in smbios_info_system()
501 return (stp->smbst_hdr->smbh_hdl); in smbios_info_system()
507 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_bboard() local
510 if (stp == NULL) in smbios_info_bboard()
513 if (stp->smbst_hdr->smbh_type != SMB_TYPE_BASEBOARD) in smbios_info_bboard()
516 smb_info_bcopy(stp->smbst_hdr, &bb, sizeof (bb)); in smbios_info_bboard()
530 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_chassis() local
534 if (stp == NULL) { in smbios_info_chassis()
538 if (stp->smbst_hdr->smbh_type != SMB_TYPE_CHASSIS) { in smbios_info_chassis()
547 if (stp->smbst_hdr->smbh_len < offsetof(smb_chassis_t, smbch_oemdata)) { in smbios_info_chassis()
551 smb_info_bcopy(stp->smbst_hdr, &ch, sizeof (ch)); in smbios_info_chassis()
560 chp->smbc_sku = smb_strptr(stp, 0); in smbios_info_chassis()
587 stp->smbst_hdr->smbh_len < skuoff + 1) { in smbios_info_chassis()
595 smb_info_bcopy_offset(stp->smbst_hdr, &strno, sizeof (strno), in smbios_info_chassis()
597 str = smb_strptr(stp, strno); in smbios_info_chassis()
614 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_chassis_elts() local
620 if (stp == NULL) { in smbios_info_chassis_elts()
624 if (stp->smbst_hdr->smbh_type != SMB_TYPE_CHASSIS) { in smbios_info_chassis_elts()
633 smb_info_bcopy(stp->smbst_hdr, &ch, sizeof (ch)); in smbios_info_chassis_elts()
645 if (stp->smbst_hdr->smbh_len < sizeof (ch) + entlen) { in smbios_info_chassis_elts()
657 smb_info_bcopy_offset(stp->smbst_hdr, &e, sizeof (e), off); in smbios_info_chassis_elts()
692 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_processor() local
695 if (stp == NULL) in smbios_info_processor()
698 if (stp->smbst_hdr->smbh_type != SMB_TYPE_PROCESSOR) in smbios_info_processor()
701 smb_info_bcopy(stp->smbst_hdr, &p, sizeof (p)); in smbios_info_processor()
753 pp->smbp_socktype = smb_strptr(stp, p.smbpr_socktype); in smbios_info_processor()
762 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_cache() local
765 if (stp == NULL) in smbios_info_cache()
768 if (stp->smbst_hdr->smbh_type != SMB_TYPE_CACHE) in smbios_info_cache()
771 smb_info_bcopy(stp->smbst_hdr, &c, sizeof (c)); in smbios_info_cache()
811 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_port() local
814 if (stp == NULL) in smbios_info_port()
817 if (stp->smbst_hdr->smbh_type != SMB_TYPE_PORT) in smbios_info_port()
820 smb_info_bcopy(stp->smbst_hdr, &p, sizeof (p)); in smbios_info_port()
823 pop->smbo_iref = smb_strptr(stp, p.smbpo_iref); in smbios_info_port()
824 pop->smbo_eref = smb_strptr(stp, p.smbpo_eref); in smbios_info_port()
836 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_slot() local
841 if (stp == NULL) in smbios_info_slot()
844 if (stp->smbst_hdr->smbh_type != SMB_TYPE_SLOT) in smbios_info_slot()
847 smb_info_bcopy(stp->smbst_hdr, &s, sizeof (s)); in smbios_info_slot()
850 sp->smbl_name = smb_strptr(stp, s.smbsl_name); in smbios_info_slot()
880 smb_info_bcopy_offset(stp->smbst_hdr, &cont, sizeof (cont), off); in smbios_info_slot()
910 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_slot_peers() local
916 if (stp == NULL) in smbios_info_slot_peers()
919 slotp = (const smb_slot_t *)stp->smbst_hdr; in smbios_info_slot_peers()
921 if (stp->smbst_hdr->smbh_type != SMB_TYPE_SLOT) in smbios_info_slot_peers()
924 if (stp->smbst_hdr->smbh_len <= offsetof(smb_slot_t, smbsl_npeers) || in smbios_info_slot_peers()
937 if (stp->smbst_hdr->smbh_len < minlen) { in smbios_info_slot_peers()
963 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_obdevs_ext() local
966 if (stp == NULL) in smbios_info_obdevs_ext()
969 if (stp->smbst_hdr->smbh_type != SMB_TYPE_OBDEVEXT) in smbios_info_obdevs_ext()
972 smb_info_bcopy(stp->smbst_hdr, &obe, sizeof (obe)); in smbios_info_obdevs_ext()
975 oep->smboe_name = smb_strptr(stp, obe.smbobe_name); in smbios_info_obdevs_ext()
988 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_obdevs() local
992 if (stp == NULL) in smbios_info_obdevs()
995 if (stp->smbst_hdr->smbh_type != SMB_TYPE_OBDEVS) in smbios_info_obdevs()
998 op = (smb_obdev_t *)((uintptr_t)stp->smbst_hdr + sizeof (smb_header_t)); in smbios_info_obdevs()
999 m = (stp->smbst_hdr->smbh_len - sizeof (smb_header_t)) / sizeof (*op); in smbios_info_obdevs()
1003 obp->smbd_name = smb_strptr(stp, op->smbob_name); in smbios_info_obdevs()
1020 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_strtab() local
1024 if (stp == NULL) in smbios_info_strtab()
1027 if (stp->smbst_hdr->smbh_type != SMB_TYPE_OEMSTR && in smbios_info_strtab()
1028 stp->smbst_hdr->smbh_type != SMB_TYPE_SYSCONFSTR && in smbios_info_strtab()
1029 stp->smbst_hdr->smbh_type != SMB_TYPE_LANG) in smbios_info_strtab()
1032 smb_info_bcopy(stp->smbst_hdr, &s, sizeof (s)); in smbios_info_strtab()
1036 argv[i] = smb_strptr(stp, i + 1); in smbios_info_strtab()
1044 const smb_struct_t *stp = smb_lookup_type(shp, SMB_TYPE_LANG); in smbios_info_lang() local
1047 if (stp == NULL) in smbios_info_lang()
1050 smb_info_bcopy(stp->smbst_hdr, &l, sizeof (l)); in smbios_info_lang()
1053 lp->smbla_cur = smb_strptr(stp, l.smblang_cur); in smbios_info_lang()
1057 return (stp->smbst_hdr->smbh_hdl); in smbios_info_lang()
1063 const smb_struct_t *stp = smb_lookup_type(shp, SMB_TYPE_EVENTLOG); in smbios_info_eventlog() local
1067 if (stp == NULL) in smbios_info_eventlog()
1070 if (stp->smbst_hdr->smbh_len < sizeof (smb_sel_t) - sizeof (uint8_t)) in smbios_info_eventlog()
1073 sel = (smb_sel_t *)(uintptr_t)stp->smbst_hdr; in smbios_info_eventlog()
1074 len = stp->smbst_hdr->smbh_len - sizeof (smb_sel_t) + sizeof (uint8_t); in smbios_info_eventlog()
1094 return (stp->smbst_hdr->smbh_hdl); in smbios_info_eventlog()
1100 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_memarray() local
1103 if (stp == NULL) in smbios_info_memarray()
1106 if (stp->smbst_hdr->smbh_type != SMB_TYPE_MEMARRAY) in smbios_info_memarray()
1109 smb_info_bcopy(stp->smbst_hdr, &m, sizeof (m)); in smbios_info_memarray()
1131 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_memarrmap() local
1134 if (stp == NULL) in smbios_info_memarrmap()
1137 if (stp->smbst_hdr->smbh_type != SMB_TYPE_MEMARRAYMAP) in smbios_info_memarrmap()
1140 smb_info_bcopy(stp->smbst_hdr, &m, sizeof (m)); in smbios_info_memarrmap()
1161 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_memdevice() local
1164 if (stp == NULL) in smbios_info_memdevice()
1167 if (stp->smbst_hdr->smbh_type != SMB_TYPE_MEMDEVICE) in smbios_info_memdevice()
1170 smb_info_bcopy(stp->smbst_hdr, &m, sizeof (m)); in smbios_info_memdevice()
1195 mdp->smbmd_dloc = smb_strptr(stp, m.smbmdev_dloc); in smbios_info_memdevice()
1196 mdp->smbmd_bloc = smb_strptr(stp, m.smbmdev_bloc); in smbios_info_memdevice()
1215 mdp->smbmd_firmware_rev = smb_strptr(stp, in smbios_info_memdevice()
1268 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_memdevmap() local
1271 if (stp == NULL) in smbios_info_memdevmap()
1274 if (stp->smbst_hdr->smbh_type != SMB_TYPE_MEMDEVICEMAP) in smbios_info_memdevmap()
1277 smb_info_bcopy(stp->smbst_hdr, &m, sizeof (m)); in smbios_info_memdevmap()
1301 const smb_struct_t *stp = smb_lookup_type(shp, SMB_TYPE_SECURITY); in smbios_info_hwsec() local
1304 if (stp == NULL) in smbios_info_hwsec()
1307 smb_info_bcopy(stp->smbst_hdr, &hs, sizeof (hs)); in smbios_info_hwsec()
1315 return (stp->smbst_hdr->smbh_hdl); in smbios_info_hwsec()
1321 const smb_struct_t *stp = smb_lookup_type(shp, SMB_TYPE_BOOT); in smbios_info_boot() local
1324 if (stp == NULL) in smbios_info_boot()
1329 b = (smb_boot_t *)(uintptr_t)stp->smbst_hdr; in smbios_info_boot()
1332 bp->smbt_size = stp->smbst_hdr->smbh_len - sizeof (smb_boot_t); in smbios_info_boot()
1335 return (stp->smbst_hdr->smbh_hdl); in smbios_info_boot()
1341 const smb_struct_t *stp = smb_lookup_type(shp, SMB_TYPE_IPMIDEV); in smbios_info_ipmi() local
1344 if (stp == NULL) in smbios_info_ipmi()
1347 smb_info_bcopy(stp->smbst_hdr, &i, sizeof (i)); in smbios_info_ipmi()
1391 return (stp->smbst_hdr->smbh_hdl); in smbios_info_ipmi()
1397 const smb_struct_t *stp = shp->sh_structs; in smbios_has_oemstr() local
1401 for (i = 0; i < shp->sh_nstructs; i++, stp++) { in smbios_has_oemstr()
1402 if (stp->smbst_hdr->smbh_type != SMB_TYPE_OEMSTR) in smbios_has_oemstr()
1405 smb_info_bcopy(stp->smbst_hdr, &s, sizeof (s)); in smbios_has_oemstr()
1407 if (strcmp(smb_strptr(stp, j + 1), oemstr) == 0) in smbios_has_oemstr()
1441 const smb_struct_t *stp; in smb_get_sn() local
1456 if ((stp = smb_lookup_type(shp, SMB_TYPE_SYSTEM)) == NULL || in smb_get_sn()
1457 smbios_info_common(shp, stp->smbst_hdr->smbh_hdl, &s1) == SMB_ERR) in smb_get_sn()
1461 if ((stp = smb_lookup_type(shp, SMB_TYPE_CHASSIS)) == NULL || in smb_get_sn()
1462 smbios_info_common(shp, stp->smbst_hdr->smbh_hdl, &s3) == SMB_ERR) in smb_get_sn()
1495 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_extprocessor() local
1498 if (stp == NULL) in smbios_info_extprocessor()
1501 if (stp->smbst_hdr->smbh_type != SUN_OEM_EXT_PROCESSOR) in smbios_info_extprocessor()
1504 exp = (smb_processor_ext_t *)(uintptr_t)stp->smbst_hdr; in smbios_info_extprocessor()
1518 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_extport() local
1521 if (stp == NULL) in smbios_info_extport()
1524 if (stp->smbst_hdr->smbh_type != SUN_OEM_EXT_PORT) in smbios_info_extport()
1527 ep = (smb_port_ext_t *)(uintptr_t)stp->smbst_hdr; in smbios_info_extport()
1543 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_pciexrc() local
1546 if (stp == NULL) in smbios_info_pciexrc()
1549 if (stp->smbst_hdr->smbh_type != SUN_OEM_PCIEXRC) in smbios_info_pciexrc()
1552 smb_info_bcopy(stp->smbst_hdr, &rc, sizeof (rc)); in smbios_info_pciexrc()
1564 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_extmemarray() local
1567 if (stp == NULL) in smbios_info_extmemarray()
1570 if (stp->smbst_hdr->smbh_type != SUN_OEM_EXT_MEMARRAY) in smbios_info_extmemarray()
1573 smb_info_bcopy(stp->smbst_hdr, &exma, sizeof (exma)); in smbios_info_extmemarray()
1587 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_extmemdevice() local
1590 if (stp == NULL) in smbios_info_extmemdevice()
1593 if (stp->smbst_hdr->smbh_type != SUN_OEM_EXT_MEMDEVICE) in smbios_info_extmemdevice()
1596 smb_info_bcopy(stp->smbst_hdr, &exmd, sizeof (exmd)); in smbios_info_extmemdevice()
1610 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_extmemdevice_cs() local
1615 if (stp == NULL) in smbios_info_extmemdevice_cs()
1618 if (stp->smbst_hdr->smbh_type != SUN_OEM_EXT_MEMDEVICE) in smbios_info_extmemdevice_cs()
1621 smb_info_bcopy(stp->smbst_hdr, &exmd, sizeof (exmd)); in smbios_info_extmemdevice_cs()
1630 if (stp->smbst_hdr->smbh_len < sizeof (exmd) + size) in smbios_info_extmemdevice_cs()
1636 smb_info_bcopy_offset(stp->smbst_hdr, buf, size, sizeof (exmd)); in smbios_info_extmemdevice_cs()
1659 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_powersup() local
1662 if (stp == NULL) in smbios_info_powersup()
1665 if (stp->smbst_hdr->smbh_type != SMB_TYPE_POWERSUP) in smbios_info_powersup()
1669 if (stp->smbst_hdr->smbh_len < 0x10) in smbios_info_powersup()
1673 smb_info_bcopy(stp->smbst_hdr, &psu, sizeof (psu)); in smbios_info_powersup()
1688 if (stp->smbst_hdr->smbh_len >= 0x12) { in smbios_info_powersup()
1694 if (stp->smbst_hdr->smbh_len >= 0x14) { in smbios_info_powersup()
1700 if (stp->smbst_hdr->smbh_len >= 0x16) { in smbios_info_powersup()
1712 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_vprobe() local
1715 if (stp == NULL) in smbios_info_vprobe()
1718 if (stp->smbst_hdr->smbh_type != SMB_TYPE_VPROBE) in smbios_info_vprobe()
1721 if (stp->smbst_hdr->smbh_len < SMB_VPROBE_MINLEN) in smbios_info_vprobe()
1725 smb_info_bcopy(stp->smbst_hdr, &vp, sizeof (vp)); in smbios_info_vprobe()
1726 vprobe->smbvp_description = smb_strptr(stp, vp.smbvpr_descr); in smbios_info_vprobe()
1735 if (stp->smbst_hdr->smbh_len >= SMB_VPROBE_NOMINAL_MINLEN) { in smbios_info_vprobe()
1747 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_cooldev() local
1750 if (stp == NULL) in smbios_info_cooldev()
1753 if (stp->smbst_hdr->smbh_type != SMB_TYPE_COOLDEV) in smbios_info_cooldev()
1756 if (stp->smbst_hdr->smbh_len < SMB_COOLDEV_MINLEN) in smbios_info_cooldev()
1760 smb_info_bcopy(stp->smbst_hdr, &cd, sizeof (cd)); in smbios_info_cooldev()
1767 if (stp->smbst_hdr->smbh_len >= SMB_COOLDEV_NOMINAL_MINLEN) { in smbios_info_cooldev()
1782 stp->smbst_hdr->smbh_len >= SMB_COOLDEV_DESCR_MINLEN) { in smbios_info_cooldev()
1783 cooldev->smbcd_descr = smb_strptr(stp, cd.smbcdev_descr); in smbios_info_cooldev()
1794 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_tprobe() local
1797 if (stp == NULL) in smbios_info_tprobe()
1800 if (stp->smbst_hdr->smbh_type != SMB_TYPE_TPROBE) in smbios_info_tprobe()
1803 if (stp->smbst_hdr->smbh_len < SMB_TPROBE_MINLEN) in smbios_info_tprobe()
1807 smb_info_bcopy(stp->smbst_hdr, &tp, sizeof (tp)); in smbios_info_tprobe()
1808 tprobe->smbtp_description = smb_strptr(stp, tp.smbtpr_descr); in smbios_info_tprobe()
1817 if (stp->smbst_hdr->smbh_len >= SMB_TPROBE_NOMINAL_MINLEN) { in smbios_info_tprobe()
1865 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_processor_info() local
1868 if (stp == NULL) in smbios_info_processor_info()
1871 if (stp->smbst_hdr->smbh_type != SMB_TYPE_PROCESSOR_INFO) in smbios_info_processor_info()
1874 if (stp->smbst_hdr->smbh_len < sizeof (pi)) in smbios_info_processor_info()
1878 smb_info_bcopy(stp->smbst_hdr, &pi, sizeof (pi)); in smbios_info_processor_info()
1880 if (sizeof (pi) + pi.smbpai_len > stp->smbst_hdr->smbh_len) in smbios_info_processor_info()
1893 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_processor_riscv() local
1897 if (stp == NULL) { in smbios_info_processor_riscv()
1901 if (stp->smbst_hdr->smbh_type != SMB_TYPE_PROCESSOR_INFO) { in smbios_info_processor_riscv()
1905 if (stp->smbst_hdr->smbh_len < sizeof (*proc)) { in smbios_info_processor_riscv()
1909 proc = (const smb_processor_info_t *)stp->smbst_hdr; in smbios_info_processor_riscv()
1910 if (sizeof (*proc) + proc->smbpai_len > stp->smbst_hdr->smbh_len) { in smbios_info_processor_riscv()
1923 if (stp->smbst_hdr->smbh_len < sizeof (*proc) + sizeof (*rv)) { in smbios_info_processor_riscv()
1957 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_pointdev() local
1960 if (stp == NULL) { in smbios_info_pointdev()
1964 if (stp->smbst_hdr->smbh_type != SMB_TYPE_POINTDEV) { in smbios_info_pointdev()
1968 if (stp->smbst_hdr->smbh_len < sizeof (point)) { in smbios_info_pointdev()
1973 smb_info_bcopy(stp->smbst_hdr, &point, sizeof (point)); in smbios_info_pointdev()
1985 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_battery() local
1988 if (stp == NULL) { in smbios_info_battery()
1992 if (stp->smbst_hdr->smbh_type != SMB_TYPE_BATTERY) { in smbios_info_battery()
1996 if (stp->smbst_hdr->smbh_len < sizeof (bat)) { in smbios_info_battery()
2001 smb_info_bcopy(stp->smbst_hdr, &bat, sizeof (bat)); in smbios_info_battery()
2007 bp->smbb_date = smb_strptr(stp, bat.smbbat_date); in smbios_info_battery()
2016 bp->smbb_serial = smb_strptr(stp, bat.smbbat_serial); in smbios_info_battery()
2027 bp->smbb_version = smb_strptr(stp, bat.smbbat_version); in smbios_info_battery()
2033 bp->smbb_schem = smb_strptr(stp, bat.smbbat_schem); in smbios_info_battery()
2042 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_strprop() local
2045 if (stp == NULL) { in smbios_info_strprop()
2049 if (stp->smbst_hdr->smbh_type != SMB_TYPE_STRPROP) { in smbios_info_strprop()
2053 if (stp->smbst_hdr->smbh_len < sizeof (prop)) { in smbios_info_strprop()
2057 if (stp->smbst_hdr->smbh_len > sizeof (prop)) { in smbios_info_strprop()
2062 smb_info_bcopy(stp->smbst_hdr, &prop, sizeof (prop)); in smbios_info_strprop()
2066 str->smbsp_prop_val = smb_strptr(stp, prop.smbstrp_prop_val); in smbios_info_strprop()
2074 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_fwinfo() local
2077 if (stp == NULL) { in smbios_info_fwinfo()
2081 if (stp->smbst_hdr->smbh_type != SMB_TYPE_FWINFO) { in smbios_info_fwinfo()
2085 if (stp->smbst_hdr->smbh_len < sizeof (fw)) { in smbios_info_fwinfo()
2093 smb_info_bcopy(stp->smbst_hdr, &fw, sizeof (fw)); in smbios_info_fwinfo()
2094 fwinfo->smbfw_name = smb_strptr(stp, fw.smbfwii_name); in smbios_info_fwinfo()
2095 fwinfo->smbfw_id = smb_strptr(stp, fw.smbfwii_id); in smbios_info_fwinfo()
2096 fwinfo->smbfw_reldate = smb_strptr(stp, fw.smbfwii_reldate); in smbios_info_fwinfo()
2097 fwinfo->smbfw_lsv = smb_strptr(stp, fw.smbfwii_lsv); in smbios_info_fwinfo()
2112 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_fwinfo_comps() local
2118 if (stp == NULL) { in smbios_info_fwinfo_comps()
2122 if (stp->smbst_hdr->smbh_type != SMB_TYPE_FWINFO) { in smbios_info_fwinfo_comps()
2126 if (stp->smbst_hdr->smbh_len < sizeof (fw)) { in smbios_info_fwinfo_comps()
2130 smb_info_bcopy(stp->smbst_hdr, &fw, sizeof (fw)); in smbios_info_fwinfo_comps()
2138 if (stp->smbst_hdr->smbh_len < need) { in smbios_info_fwinfo_comps()
2150 smb_info_bcopy_offset(stp->smbst_hdr, &id, sizeof (id), off); in smbios_info_fwinfo_comps()
2177 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_addinfo_nents() local
2180 if (stp == NULL) { in smbios_info_addinfo_nents()
2184 if (stp->smbst_hdr->smbh_type != SMB_TYPE_ADDINFO) { in smbios_info_addinfo_nents()
2188 if (stp->smbst_hdr->smbh_len < sizeof (add)) { in smbios_info_addinfo_nents()
2192 smb_info_bcopy(stp->smbst_hdr, &add, sizeof (add)); in smbios_info_addinfo_nents()
2213 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_addinfo_ent() local
2220 if (stp == NULL) { in smbios_info_addinfo_ent()
2224 if (stp->smbst_hdr->smbh_type != SMB_TYPE_ADDINFO) { in smbios_info_addinfo_ent()
2228 if (stp->smbst_hdr->smbh_len < sizeof (add)) { in smbios_info_addinfo_ent()
2232 smb_info_bcopy(stp->smbst_hdr, &add, sizeof (add)); in smbios_info_addinfo_ent()
2239 if (off + sizeof (ent) > stp->smbst_hdr->smbh_len) { in smbios_info_addinfo_ent()
2243 smb_info_bcopy_offset(stp->smbst_hdr, &ent, sizeof (ent), off); in smbios_info_addinfo_ent()
2248 if (ent.smbaie_len + off > stp->smbst_hdr->smbh_len) { in smbios_info_addinfo_ent()
2265 entry->smbai_str = smb_strptr(stp, ent.smbaie_str); in smbios_info_addinfo_ent()
2276 smb_info_bcopy_offset(stp->smbst_hdr, entry->smbai_data, in smbios_info_addinfo_ent()