Lines Matching refs:ep
54 smbios_entry_t *ep = alloca(SMB_ENTRY_MAXLEN);
59 if ((n = pread64(fd, ep, sizeof (*ep), 0)) != sizeof (*ep))
62 if (strncmp(ep->smbe_eanchor, SMB_ENTRY_EANCHOR, SMB_ENTRY_EANCHORLEN))
65 elen = MIN(ep->smbe_elen, SMB_ENTRY_MAXLEN);
67 if ((n = pread64(fd, ep, elen, 0)) != elen)
70 if ((stbuf = smb_alloc(ep->smbe_stlen)) == NULL)
73 if ((n = pread64(fd, stbuf, ep->smbe_stlen,
74 (off64_t)ep->smbe_staddr)) != ep->smbe_stlen) {
75 smb_free(stbuf, ep->smbe_stlen);
79 shp = smbios_bufopen(ep, stbuf, ep->smbe_stlen, version, flags, errp);
84 smb_free(stbuf, ep->smbe_stlen);
92 smbios_entry_t *ep = alloca(SMB_ENTRY_MAXLEN);
115 bcopy(p, ep, sizeof (smbios_entry_t));
116 ep->smbe_elen = MIN(ep->smbe_elen, SMB_ENTRY_MAXLEN);
117 bcopy(p, ep, ep->smbe_elen);
122 pgoff = ep->smbe_staddr & ~pgmask;
124 bios = mmap(NULL, ep->smbe_stlen + pgoff,
125 PROT_READ, MAP_SHARED, fd, ep->smbe_staddr & pgmask);
130 if ((stbuf = smb_alloc(ep->smbe_stlen)) == NULL) {
131 (void) munmap(bios, ep->smbe_stlen + pgoff);
135 bcopy((char *)bios + pgoff, stbuf, ep->smbe_stlen);
136 (void) munmap(bios, ep->smbe_stlen + pgoff);
137 shp = smbios_bufopen(ep, stbuf, ep->smbe_stlen, version, flags, errp);
142 smb_free(stbuf, ep->smbe_stlen);
196 smbios_entry_t ep;
197 off64_t off = lseek64(fd, 0, SEEK_CUR) + P2ROUNDUP(sizeof (ep), 16);
202 bcopy(&shp->sh_ent, &ep, sizeof (ep));
203 ep.smbe_staddr = (uint32_t)off;
204 smbios_checksum(shp, &ep);
206 if (smbios_xwrite(shp, fd, &ep, sizeof (ep)) == -1 ||