Lines Matching defs:shp
36 * stp = smb_lookup_type(shp, foo);
226 smbios_info_smbios(smbios_hdl_t *shp, smbios_entry_t *ep)
228 bcopy(&shp->sh_ent, ep, sizeof (smbios_entry_t));
237 smbios_info_common(smbios_hdl_t *shp, id_t id, smbios_info_t *ip)
239 const smb_struct_t *stp = smb_lookup_id(shp, id);
290 return (n ? 0 : smb_set_errno(shp, ESMB_NOINFO));
300 smbios_info_contains(smbios_hdl_t *shp, id_t id, uint_t idc, id_t *idv)
302 const smb_struct_t *stp = smb_lookup_id(shp, id);
318 return (smb_set_errno(shp, ESMB_TYPE));
331 return (smb_set_errno(shp, ESMB_INVAL));
338 smbios_info_bios(smbios_hdl_t *shp, smbios_bios_t *bp)
340 const smb_struct_t *stp = smb_lookup_type(shp, SMB_TYPE_BIOS);
347 return (smb_set_errno(shp, ESMB_CORRUPT));
370 smb_gteq(shp, SMB_VERSION_24)) {
386 smbios_info_system(smbios_hdl_t *shp, smbios_system_t *sip)
388 const smb_struct_t *stp = smb_lookup_type(shp, SMB_TYPE_SYSTEM);
407 smbios_info_bboard(smbios_hdl_t *shp, id_t id, smbios_bboard_t *bbp)
409 const smb_struct_t *stp = smb_lookup_id(shp, id);
416 return (smb_set_errno(shp, ESMB_TYPE));
430 smbios_info_chassis(smbios_hdl_t *shp, id_t id, smbios_chassis_t *chp)
432 const smb_struct_t *stp = smb_lookup_id(shp, id);
441 return (smb_set_errno(shp, ESMB_TYPE));
445 if (shp->sh_libvers >= SMB_VERSION_27) {
461 if (shp->sh_libvers >= SMB_VERSION_27) {
470 smbios_info_processor(smbios_hdl_t *shp, id_t id, smbios_processor_t *pp)
472 const smb_struct_t *stp = smb_lookup_id(shp, id);
479 return (smb_set_errno(shp, ESMB_TYPE));
496 if (shp->sh_libvers >= SMB_VERSION_25) {
503 if (shp->sh_libvers >= SMB_VERSION_26)
506 if (shp->sh_libvers >= SMB_VERSION_30) {
516 smbios_info_cache(smbios_hdl_t *shp, id_t id, smbios_cache_t *cap)
518 const smb_struct_t *stp = smb_lookup_id(shp, id);
525 return (smb_set_errno(shp, ESMB_TYPE));
552 smbios_info_port(smbios_hdl_t *shp, id_t id, smbios_port_t *pop)
554 const smb_struct_t *stp = smb_lookup_id(shp, id);
561 return (smb_set_errno(shp, ESMB_TYPE));
577 smbios_info_slot(smbios_hdl_t *shp, id_t id, smbios_slot_t *sp)
579 const smb_struct_t *stp = smb_lookup_id(shp, id);
586 return (smb_set_errno(shp, ESMB_TYPE));
607 smbios_info_obdevs_ext(smbios_hdl_t *shp, id_t id, smbios_obdev_ext_t *oep)
609 const smb_struct_t *stp = smb_lookup_id(shp, id);
616 return (smb_set_errno(shp, ESMB_TYPE));
632 smbios_info_obdevs(smbios_hdl_t *shp, id_t id, int obc, smbios_obdev_t *obp)
634 const smb_struct_t *stp = smb_lookup_id(shp, id);
642 return (smb_set_errno(shp, ESMB_TYPE));
664 smbios_info_strtab(smbios_hdl_t *shp, id_t id, int argc, const char *argv[])
666 const smb_struct_t *stp = smb_lookup_id(shp, id);
676 return (smb_set_errno(shp, ESMB_TYPE));
688 smbios_info_lang(smbios_hdl_t *shp, smbios_lang_t *lp)
690 const smb_struct_t *stp = smb_lookup_type(shp, SMB_TYPE_LANG);
707 smbios_info_eventlog(smbios_hdl_t *shp, smbios_evlog_t *evp)
709 const smb_struct_t *stp = smb_lookup_type(shp, SMB_TYPE_EVENTLOG);
717 return (smb_set_errno(shp, ESMB_CORRUPT));
724 return (smb_set_errno(shp, ESMB_CORRUPT));
744 smbios_info_memarray(smbios_hdl_t *shp, id_t id, smbios_memarray_t *map)
746 const smb_struct_t *stp = smb_lookup_id(shp, id);
753 return (smb_set_errno(shp, ESMB_TYPE));
775 smbios_info_memarrmap(smbios_hdl_t *shp, id_t id, smbios_memarrmap_t *map)
777 const smb_struct_t *stp = smb_lookup_id(shp, id);
784 return (smb_set_errno(shp, ESMB_TYPE));
805 smbios_info_memdevice(smbios_hdl_t *shp, id_t id, smbios_memdevice_t *mdp)
807 const smb_struct_t *stp = smb_lookup_id(shp, id);
814 return (smb_set_errno(shp, ESMB_TYPE));
844 if (shp->sh_libvers >= SMB_VERSION_26)
847 if (shp->sh_libvers >= SMB_VERSION_27)
850 if (shp->sh_libvers >= SMB_VERSION_28) {
860 smbios_info_memdevmap(smbios_hdl_t *shp, id_t id, smbios_memdevmap_t *mdp)
862 const smb_struct_t *stp = smb_lookup_id(shp, id);
869 return (smb_set_errno(shp, ESMB_TYPE));
893 smbios_info_hwsec(smbios_hdl_t *shp, smbios_hwsec_t *hsp)
895 const smb_struct_t *stp = smb_lookup_type(shp, SMB_TYPE_SECURITY);
913 smbios_info_boot(smbios_hdl_t *shp, smbios_boot_t *bp)
915 const smb_struct_t *stp = smb_lookup_type(shp, SMB_TYPE_BOOT);
931 smbios_info_ipmi(smbios_hdl_t *shp, smbios_ipmi_t *ip)
933 const smb_struct_t *stp = smb_lookup_type(shp, SMB_TYPE_IPMIDEV);
987 smbios_has_oemstr(smbios_hdl_t *shp, const char *oemstr)
989 const smb_struct_t *stp = shp->sh_structs;
993 for (i = 0; i < shp->sh_nstructs; i++, stp++) {
1031 smb_get_sn(smbios_hdl_t *shp, const char **psnp, const char **csnp)
1037 return (smb_set_errno(shp, ESMB_INVAL));
1048 if ((stp = smb_lookup_type(shp, SMB_TYPE_SYSTEM)) == NULL ||
1049 smbios_info_common(shp, stp->smbst_hdr->smbh_hdl, &s1) == SMB_ERR)
1053 if ((stp = smb_lookup_type(shp, SMB_TYPE_CHASSIS)) == NULL ||
1054 smbios_info_common(shp, stp->smbst_hdr->smbh_hdl, &s3) == SMB_ERR)
1057 if (smbios_has_oemstr(shp, SMB_PRMS1)) {
1068 smbios_psn(smbios_hdl_t *shp)
1072 return (smb_get_sn(shp, &psn, &csn) == SMB_ERR ? NULL : psn);
1076 smbios_csn(smbios_hdl_t *shp)
1080 return (smb_get_sn(shp, &psn, &csn) == SMB_ERR ? NULL : csn);
1084 smbios_info_extprocessor(smbios_hdl_t *shp, id_t id,
1087 const smb_struct_t *stp = smb_lookup_id(shp, id);
1094 return (smb_set_errno(shp, ESMB_TYPE));
1108 smbios_info_extport(smbios_hdl_t *shp, id_t id, smbios_port_ext_t *eportp)
1110 const smb_struct_t *stp = smb_lookup_id(shp, id);
1117 return (smb_set_errno(shp, ESMB_TYPE));
1132 smbios_info_pciexrc(smbios_hdl_t *shp, id_t id,
1135 const smb_struct_t *stp = smb_lookup_id(shp, id);
1142 return (smb_set_errno(shp, ESMB_TYPE));
1154 smbios_info_extmemarray(smbios_hdl_t *shp, id_t id, smbios_memarray_ext_t *emap)
1156 const smb_struct_t *stp = smb_lookup_id(shp, id);
1163 return (smb_set_errno(shp, ESMB_TYPE));
1176 smbios_info_extmemdevice(smbios_hdl_t *shp, id_t id,
1179 const smb_struct_t *stp = smb_lookup_id(shp, id);
1186 return (smb_set_errno(shp, ESMB_TYPE));