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()
752 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_cache() local
755 if (stp == NULL) in smbios_info_cache()
758 if (stp->smbst_hdr->smbh_type != SMB_TYPE_CACHE) in smbios_info_cache()
761 smb_info_bcopy(stp->smbst_hdr, &c, sizeof (c)); in smbios_info_cache()
801 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_port() local
804 if (stp == NULL) in smbios_info_port()
807 if (stp->smbst_hdr->smbh_type != SMB_TYPE_PORT) in smbios_info_port()
810 smb_info_bcopy(stp->smbst_hdr, &p, sizeof (p)); in smbios_info_port()
813 pop->smbo_iref = smb_strptr(stp, p.smbpo_iref); in smbios_info_port()
814 pop->smbo_eref = smb_strptr(stp, p.smbpo_eref); in smbios_info_port()
826 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_slot() local
831 if (stp == NULL) in smbios_info_slot()
834 if (stp->smbst_hdr->smbh_type != SMB_TYPE_SLOT) in smbios_info_slot()
837 smb_info_bcopy(stp->smbst_hdr, &s, sizeof (s)); in smbios_info_slot()
840 sp->smbl_name = smb_strptr(stp, s.smbsl_name); in smbios_info_slot()
870 smb_info_bcopy_offset(stp->smbst_hdr, &cont, sizeof (cont), off); in smbios_info_slot()
900 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_slot_peers() local
906 if (stp == NULL) in smbios_info_slot_peers()
909 slotp = (const smb_slot_t *)stp->smbst_hdr; in smbios_info_slot_peers()
911 if (stp->smbst_hdr->smbh_type != SMB_TYPE_SLOT) in smbios_info_slot_peers()
914 if (stp->smbst_hdr->smbh_len <= offsetof(smb_slot_t, smbsl_npeers) || in smbios_info_slot_peers()
927 if (stp->smbst_hdr->smbh_len < minlen) { in smbios_info_slot_peers()
953 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_obdevs_ext() local
956 if (stp == NULL) in smbios_info_obdevs_ext()
959 if (stp->smbst_hdr->smbh_type != SMB_TYPE_OBDEVEXT) in smbios_info_obdevs_ext()
962 smb_info_bcopy(stp->smbst_hdr, &obe, sizeof (obe)); in smbios_info_obdevs_ext()
965 oep->smboe_name = smb_strptr(stp, obe.smbobe_name); in smbios_info_obdevs_ext()
978 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_obdevs() local
982 if (stp == NULL) in smbios_info_obdevs()
985 if (stp->smbst_hdr->smbh_type != SMB_TYPE_OBDEVS) in smbios_info_obdevs()
988 op = (smb_obdev_t *)((uintptr_t)stp->smbst_hdr + sizeof (smb_header_t)); in smbios_info_obdevs()
989 m = (stp->smbst_hdr->smbh_len - sizeof (smb_header_t)) / sizeof (*op); in smbios_info_obdevs()
993 obp->smbd_name = smb_strptr(stp, op->smbob_name); in smbios_info_obdevs()
1010 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_strtab() local
1014 if (stp == NULL) in smbios_info_strtab()
1017 if (stp->smbst_hdr->smbh_type != SMB_TYPE_OEMSTR && in smbios_info_strtab()
1018 stp->smbst_hdr->smbh_type != SMB_TYPE_SYSCONFSTR && in smbios_info_strtab()
1019 stp->smbst_hdr->smbh_type != SMB_TYPE_LANG) in smbios_info_strtab()
1022 smb_info_bcopy(stp->smbst_hdr, &s, sizeof (s)); in smbios_info_strtab()
1026 argv[i] = smb_strptr(stp, i + 1); in smbios_info_strtab()
1034 const smb_struct_t *stp = smb_lookup_type(shp, SMB_TYPE_LANG); in smbios_info_lang() local
1037 if (stp == NULL) in smbios_info_lang()
1040 smb_info_bcopy(stp->smbst_hdr, &l, sizeof (l)); in smbios_info_lang()
1043 lp->smbla_cur = smb_strptr(stp, l.smblang_cur); in smbios_info_lang()
1047 return (stp->smbst_hdr->smbh_hdl); in smbios_info_lang()
1053 const smb_struct_t *stp = smb_lookup_type(shp, SMB_TYPE_EVENTLOG); in smbios_info_eventlog() local
1057 if (stp == NULL) in smbios_info_eventlog()
1060 if (stp->smbst_hdr->smbh_len < sizeof (smb_sel_t) - sizeof (uint8_t)) in smbios_info_eventlog()
1063 sel = (smb_sel_t *)(uintptr_t)stp->smbst_hdr; in smbios_info_eventlog()
1064 len = stp->smbst_hdr->smbh_len - sizeof (smb_sel_t) + sizeof (uint8_t); in smbios_info_eventlog()
1084 return (stp->smbst_hdr->smbh_hdl); in smbios_info_eventlog()
1090 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_memarray() local
1093 if (stp == NULL) in smbios_info_memarray()
1096 if (stp->smbst_hdr->smbh_type != SMB_TYPE_MEMARRAY) in smbios_info_memarray()
1099 smb_info_bcopy(stp->smbst_hdr, &m, sizeof (m)); in smbios_info_memarray()
1121 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_memarrmap() local
1124 if (stp == NULL) in smbios_info_memarrmap()
1127 if (stp->smbst_hdr->smbh_type != SMB_TYPE_MEMARRAYMAP) in smbios_info_memarrmap()
1130 smb_info_bcopy(stp->smbst_hdr, &m, sizeof (m)); in smbios_info_memarrmap()
1151 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_memdevice() local
1154 if (stp == NULL) in smbios_info_memdevice()
1157 if (stp->smbst_hdr->smbh_type != SMB_TYPE_MEMDEVICE) in smbios_info_memdevice()
1160 smb_info_bcopy(stp->smbst_hdr, &m, sizeof (m)); in smbios_info_memdevice()
1185 mdp->smbmd_dloc = smb_strptr(stp, m.smbmdev_dloc); in smbios_info_memdevice()
1186 mdp->smbmd_bloc = smb_strptr(stp, m.smbmdev_bloc); in smbios_info_memdevice()
1205 mdp->smbmd_firmware_rev = smb_strptr(stp, in smbios_info_memdevice()
1258 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_memdevmap() local
1261 if (stp == NULL) in smbios_info_memdevmap()
1264 if (stp->smbst_hdr->smbh_type != SMB_TYPE_MEMDEVICEMAP) in smbios_info_memdevmap()
1267 smb_info_bcopy(stp->smbst_hdr, &m, sizeof (m)); in smbios_info_memdevmap()
1291 const smb_struct_t *stp = smb_lookup_type(shp, SMB_TYPE_SECURITY); in smbios_info_hwsec() local
1294 if (stp == NULL) in smbios_info_hwsec()
1297 smb_info_bcopy(stp->smbst_hdr, &hs, sizeof (hs)); in smbios_info_hwsec()
1305 return (stp->smbst_hdr->smbh_hdl); in smbios_info_hwsec()
1311 const smb_struct_t *stp = smb_lookup_type(shp, SMB_TYPE_BOOT); in smbios_info_boot() local
1314 if (stp == NULL) in smbios_info_boot()
1319 b = (smb_boot_t *)(uintptr_t)stp->smbst_hdr; in smbios_info_boot()
1322 bp->smbt_size = stp->smbst_hdr->smbh_len - sizeof (smb_boot_t); in smbios_info_boot()
1325 return (stp->smbst_hdr->smbh_hdl); in smbios_info_boot()
1331 const smb_struct_t *stp = smb_lookup_type(shp, SMB_TYPE_IPMIDEV); in smbios_info_ipmi() local
1334 if (stp == NULL) in smbios_info_ipmi()
1337 smb_info_bcopy(stp->smbst_hdr, &i, sizeof (i)); in smbios_info_ipmi()
1381 return (stp->smbst_hdr->smbh_hdl); in smbios_info_ipmi()
1387 const smb_struct_t *stp = shp->sh_structs; in smbios_has_oemstr() local
1391 for (i = 0; i < shp->sh_nstructs; i++, stp++) { in smbios_has_oemstr()
1392 if (stp->smbst_hdr->smbh_type != SMB_TYPE_OEMSTR) in smbios_has_oemstr()
1395 smb_info_bcopy(stp->smbst_hdr, &s, sizeof (s)); in smbios_has_oemstr()
1397 if (strcmp(smb_strptr(stp, j + 1), oemstr) == 0) in smbios_has_oemstr()
1431 const smb_struct_t *stp; in smb_get_sn() local
1446 if ((stp = smb_lookup_type(shp, SMB_TYPE_SYSTEM)) == NULL || in smb_get_sn()
1447 smbios_info_common(shp, stp->smbst_hdr->smbh_hdl, &s1) == SMB_ERR) in smb_get_sn()
1451 if ((stp = smb_lookup_type(shp, SMB_TYPE_CHASSIS)) == NULL || in smb_get_sn()
1452 smbios_info_common(shp, stp->smbst_hdr->smbh_hdl, &s3) == SMB_ERR) in smb_get_sn()
1485 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_extprocessor() local
1488 if (stp == NULL) in smbios_info_extprocessor()
1491 if (stp->smbst_hdr->smbh_type != SUN_OEM_EXT_PROCESSOR) in smbios_info_extprocessor()
1494 exp = (smb_processor_ext_t *)(uintptr_t)stp->smbst_hdr; in smbios_info_extprocessor()
1508 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_extport() local
1511 if (stp == NULL) in smbios_info_extport()
1514 if (stp->smbst_hdr->smbh_type != SUN_OEM_EXT_PORT) in smbios_info_extport()
1517 ep = (smb_port_ext_t *)(uintptr_t)stp->smbst_hdr; in smbios_info_extport()
1533 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_pciexrc() local
1536 if (stp == NULL) in smbios_info_pciexrc()
1539 if (stp->smbst_hdr->smbh_type != SUN_OEM_PCIEXRC) in smbios_info_pciexrc()
1542 smb_info_bcopy(stp->smbst_hdr, &rc, sizeof (rc)); in smbios_info_pciexrc()
1554 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_extmemarray() local
1557 if (stp == NULL) in smbios_info_extmemarray()
1560 if (stp->smbst_hdr->smbh_type != SUN_OEM_EXT_MEMARRAY) in smbios_info_extmemarray()
1563 smb_info_bcopy(stp->smbst_hdr, &exma, sizeof (exma)); in smbios_info_extmemarray()
1577 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_extmemdevice() local
1580 if (stp == NULL) in smbios_info_extmemdevice()
1583 if (stp->smbst_hdr->smbh_type != SUN_OEM_EXT_MEMDEVICE) in smbios_info_extmemdevice()
1586 smb_info_bcopy(stp->smbst_hdr, &exmd, sizeof (exmd)); in smbios_info_extmemdevice()
1600 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_extmemdevice_cs() local
1605 if (stp == NULL) in smbios_info_extmemdevice_cs()
1608 if (stp->smbst_hdr->smbh_type != SUN_OEM_EXT_MEMDEVICE) in smbios_info_extmemdevice_cs()
1611 smb_info_bcopy(stp->smbst_hdr, &exmd, sizeof (exmd)); in smbios_info_extmemdevice_cs()
1620 if (stp->smbst_hdr->smbh_len < sizeof (exmd) + size) in smbios_info_extmemdevice_cs()
1626 smb_info_bcopy_offset(stp->smbst_hdr, buf, size, sizeof (exmd)); in smbios_info_extmemdevice_cs()
1649 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_powersup() local
1652 if (stp == NULL) in smbios_info_powersup()
1655 if (stp->smbst_hdr->smbh_type != SMB_TYPE_POWERSUP) in smbios_info_powersup()
1659 if (stp->smbst_hdr->smbh_len < 0x10) in smbios_info_powersup()
1663 smb_info_bcopy(stp->smbst_hdr, &psu, sizeof (psu)); in smbios_info_powersup()
1678 if (stp->smbst_hdr->smbh_len >= 0x12) { in smbios_info_powersup()
1684 if (stp->smbst_hdr->smbh_len >= 0x14) { in smbios_info_powersup()
1690 if (stp->smbst_hdr->smbh_len >= 0x16) { in smbios_info_powersup()
1702 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_vprobe() local
1705 if (stp == NULL) in smbios_info_vprobe()
1708 if (stp->smbst_hdr->smbh_type != SMB_TYPE_VPROBE) in smbios_info_vprobe()
1711 if (stp->smbst_hdr->smbh_len < SMB_VPROBE_MINLEN) in smbios_info_vprobe()
1715 smb_info_bcopy(stp->smbst_hdr, &vp, sizeof (vp)); in smbios_info_vprobe()
1716 vprobe->smbvp_description = smb_strptr(stp, vp.smbvpr_descr); in smbios_info_vprobe()
1725 if (stp->smbst_hdr->smbh_len >= SMB_VPROBE_NOMINAL_MINLEN) { in smbios_info_vprobe()
1737 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_cooldev() local
1740 if (stp == NULL) in smbios_info_cooldev()
1743 if (stp->smbst_hdr->smbh_type != SMB_TYPE_COOLDEV) in smbios_info_cooldev()
1746 if (stp->smbst_hdr->smbh_len < SMB_COOLDEV_MINLEN) in smbios_info_cooldev()
1750 smb_info_bcopy(stp->smbst_hdr, &cd, sizeof (cd)); in smbios_info_cooldev()
1757 if (stp->smbst_hdr->smbh_len >= SMB_COOLDEV_NOMINAL_MINLEN) { in smbios_info_cooldev()
1772 stp->smbst_hdr->smbh_len >= SMB_COOLDEV_DESCR_MINLEN) { in smbios_info_cooldev()
1773 cooldev->smbcd_descr = smb_strptr(stp, cd.smbcdev_descr); in smbios_info_cooldev()
1784 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_tprobe() local
1787 if (stp == NULL) in smbios_info_tprobe()
1790 if (stp->smbst_hdr->smbh_type != SMB_TYPE_TPROBE) in smbios_info_tprobe()
1793 if (stp->smbst_hdr->smbh_len < SMB_TPROBE_MINLEN) in smbios_info_tprobe()
1797 smb_info_bcopy(stp->smbst_hdr, &tp, sizeof (tp)); in smbios_info_tprobe()
1798 tprobe->smbtp_description = smb_strptr(stp, tp.smbtpr_descr); in smbios_info_tprobe()
1807 if (stp->smbst_hdr->smbh_len >= SMB_TPROBE_NOMINAL_MINLEN) { in smbios_info_tprobe()
1855 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_processor_info() local
1858 if (stp == NULL) in smbios_info_processor_info()
1861 if (stp->smbst_hdr->smbh_type != SMB_TYPE_PROCESSOR_INFO) in smbios_info_processor_info()
1864 if (stp->smbst_hdr->smbh_len < sizeof (pi)) in smbios_info_processor_info()
1868 smb_info_bcopy(stp->smbst_hdr, &pi, sizeof (pi)); in smbios_info_processor_info()
1870 if (sizeof (pi) + pi.smbpai_len > stp->smbst_hdr->smbh_len) in smbios_info_processor_info()
1883 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_processor_riscv() local
1887 if (stp == NULL) { in smbios_info_processor_riscv()
1891 if (stp->smbst_hdr->smbh_type != SMB_TYPE_PROCESSOR_INFO) { in smbios_info_processor_riscv()
1895 if (stp->smbst_hdr->smbh_len < sizeof (*proc)) { in smbios_info_processor_riscv()
1899 proc = (const smb_processor_info_t *)stp->smbst_hdr; in smbios_info_processor_riscv()
1900 if (sizeof (*proc) + proc->smbpai_len > stp->smbst_hdr->smbh_len) { in smbios_info_processor_riscv()
1913 if (stp->smbst_hdr->smbh_len < sizeof (*proc) + sizeof (*rv)) { in smbios_info_processor_riscv()
1947 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_pointdev() local
1950 if (stp == NULL) { in smbios_info_pointdev()
1954 if (stp->smbst_hdr->smbh_type != SMB_TYPE_POINTDEV) { in smbios_info_pointdev()
1958 if (stp->smbst_hdr->smbh_len < sizeof (point)) { in smbios_info_pointdev()
1963 smb_info_bcopy(stp->smbst_hdr, &point, sizeof (point)); in smbios_info_pointdev()
1975 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_battery() local
1978 if (stp == NULL) { in smbios_info_battery()
1982 if (stp->smbst_hdr->smbh_type != SMB_TYPE_BATTERY) { in smbios_info_battery()
1986 if (stp->smbst_hdr->smbh_len < sizeof (bat)) { in smbios_info_battery()
1991 smb_info_bcopy(stp->smbst_hdr, &bat, sizeof (bat)); in smbios_info_battery()
1997 bp->smbb_date = smb_strptr(stp, bat.smbbat_date); in smbios_info_battery()
2006 bp->smbb_serial = smb_strptr(stp, bat.smbbat_serial); in smbios_info_battery()
2017 bp->smbb_version = smb_strptr(stp, bat.smbbat_version); in smbios_info_battery()
2023 bp->smbb_schem = smb_strptr(stp, bat.smbbat_schem); in smbios_info_battery()
2032 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_strprop() local
2035 if (stp == NULL) { in smbios_info_strprop()
2039 if (stp->smbst_hdr->smbh_type != SMB_TYPE_STRPROP) { in smbios_info_strprop()
2043 if (stp->smbst_hdr->smbh_len < sizeof (prop)) { in smbios_info_strprop()
2047 if (stp->smbst_hdr->smbh_len > sizeof (prop)) { in smbios_info_strprop()
2052 smb_info_bcopy(stp->smbst_hdr, &prop, sizeof (prop)); in smbios_info_strprop()
2056 str->smbsp_prop_val = smb_strptr(stp, prop.smbstrp_prop_val); in smbios_info_strprop()
2064 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_fwinfo() local
2067 if (stp == NULL) { in smbios_info_fwinfo()
2071 if (stp->smbst_hdr->smbh_type != SMB_TYPE_FWINFO) { in smbios_info_fwinfo()
2075 if (stp->smbst_hdr->smbh_len < sizeof (fw)) { in smbios_info_fwinfo()
2083 smb_info_bcopy(stp->smbst_hdr, &fw, sizeof (fw)); in smbios_info_fwinfo()
2084 fwinfo->smbfw_name = smb_strptr(stp, fw.smbfwii_name); in smbios_info_fwinfo()
2085 fwinfo->smbfw_id = smb_strptr(stp, fw.smbfwii_id); in smbios_info_fwinfo()
2086 fwinfo->smbfw_reldate = smb_strptr(stp, fw.smbfwii_reldate); in smbios_info_fwinfo()
2087 fwinfo->smbfw_lsv = smb_strptr(stp, fw.smbfwii_lsv); in smbios_info_fwinfo()
2102 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_fwinfo_comps() local
2108 if (stp == NULL) { in smbios_info_fwinfo_comps()
2112 if (stp->smbst_hdr->smbh_type != SMB_TYPE_FWINFO) { in smbios_info_fwinfo_comps()
2116 if (stp->smbst_hdr->smbh_len < sizeof (fw)) { in smbios_info_fwinfo_comps()
2120 smb_info_bcopy(stp->smbst_hdr, &fw, sizeof (fw)); in smbios_info_fwinfo_comps()
2128 if (stp->smbst_hdr->smbh_len < need) { in smbios_info_fwinfo_comps()
2140 smb_info_bcopy_offset(stp->smbst_hdr, &id, sizeof (id), off); in smbios_info_fwinfo_comps()
2167 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_addinfo_nents() local
2170 if (stp == NULL) { in smbios_info_addinfo_nents()
2174 if (stp->smbst_hdr->smbh_type != SMB_TYPE_ADDINFO) { in smbios_info_addinfo_nents()
2178 if (stp->smbst_hdr->smbh_len < sizeof (add)) { in smbios_info_addinfo_nents()
2182 smb_info_bcopy(stp->smbst_hdr, &add, sizeof (add)); in smbios_info_addinfo_nents()
2203 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_addinfo_ent() local
2210 if (stp == NULL) { in smbios_info_addinfo_ent()
2214 if (stp->smbst_hdr->smbh_type != SMB_TYPE_ADDINFO) { in smbios_info_addinfo_ent()
2218 if (stp->smbst_hdr->smbh_len < sizeof (add)) { in smbios_info_addinfo_ent()
2222 smb_info_bcopy(stp->smbst_hdr, &add, sizeof (add)); in smbios_info_addinfo_ent()
2229 if (off + sizeof (ent) > stp->smbst_hdr->smbh_len) { in smbios_info_addinfo_ent()
2233 smb_info_bcopy_offset(stp->smbst_hdr, &ent, sizeof (ent), off); in smbios_info_addinfo_ent()
2238 if (ent.smbaie_len + off > stp->smbst_hdr->smbh_len) { in smbios_info_addinfo_ent()
2255 entry->smbai_str = smb_strptr(stp, ent.smbaie_str); in smbios_info_addinfo_ent()
2266 smb_info_bcopy_offset(stp->smbst_hdr, entry->smbai_data, in smbios_info_addinfo_ent()