Lines Matching refs:offset

295 	seghdr->offset	= seg_layout->offset;
339 if (offset_tbl[cntx].offset >
340 offset_tbl[cnty].offset) {
355 * back to the new segment offset.
373 segment->length, segment->offset);
378 segment->offset = newoffset;
380 ret = pwrite(contfd, buffer, segment->length, segment->offset);
401 if (offset_tbl[cnt].offset
402 - (offset_tbl[cnt -1 ].offset
405 diff = offset_tbl[cnt].offset -
406 (offset_tbl[cnt - 1].offset
408 newoffset = offset_tbl[cnt - 1].offset
414 offset_tbl[cnt - 1].offset = newoffset;
423 * Description : build_offset_tbl() builds the offset table by reading all the
443 offset_tbl[cnt].offset = segment->offset;
450 offset_tbl[cnt].offset = sizeof (section_layout_t) + ((cnt + 1)
458 offset_tbl[cnt+1].offset = secsize;
471 if (bytes <= offset_tbl[cnt].offset -
472 (offset_tbl[cnt - 1].offset +
474 return (offset_tbl[cnt].offset - bytes);
477 *totsize += offset_tbl[cnt].offset -
478 (offset_tbl[cnt - 1].offset +
493 if ((segoffset + size) <= offset_tbl[0].offset)
501 * a valid offset.
522 * and other end of segment. first segment offset is first available
523 * space and length is 0. second segment offset is is segment length and
524 * offset is 0. build_offset_tbl() explains how upper boundary and lower
533 /* read all the segment header to make offset table */
543 /* new segment header offset */
560 if (newoffset != 0) { /* found new offset */
561 /* now new offset */
562 offset_tbl[0].offset = newoffset;
566 /* again sort the offset table */
830 sec_hash_obj->u.sec_obj->section.offset =
926 section->offset = sec_obj->section.offset;
934 sec_obj->section.offset);
963 sec_obj->section.offset + sizeof (sec_hdr));
1184 segment->offset = seg_object->u.seg_obj->segment.offset;
1204 * for the added segment. The segment offset is mandatory for FIXED
1205 * segments; otherwise, the offset is advisory.
1219 int offset;
1279 offset = sec_hash->u.sec_obj->section.offset;
1282 retval = pread(fd, &sec_layout, sizeof (sec_layout), offset);
1313 offset + sizeof (section_layout_t));
1319 new_seg_offset = segment->offset; /* new segment offset */
1326 /* get new offset for new segment to be addedd */
1342 seg_layout->offset = new_seg_offset; /* new segment offset */
1362 retval = pwrite(fd, &sec_layout, sizeof (section_layout_t), offset);
1369 retval = pwrite(fd, segment_buf, bufsize, offset +
1573 sec_hash->u.sec_obj->section.offset);
1581 sec_hash->u.sec_obj->section.offset +
1619 sec_hash->u.sec_obj->section.offset);
1627 sec_hash->u.sec_obj->section.offset +
1700 retval = pread(fd, buffer, nbytes, seg_hash->u.seg_obj->segment.offset);
1732 get_packet(int device_fd, void *buffer, int size, int offset)
1736 retval = pread(device_fd, (char *)buffer, size, offset);
1786 int offset = 0;
1808 (void) memcpy(buffer + offset, &pkt_hash->u.pkt_obj->tag,
1810 offset += pkt_hash->u.pkt_obj->tag_size;
1822 (void) memcpy(buffer + offset, payload,
1824 offset += pkt_hash->u.pkt_obj->paylen;
1839 get_packets(hash_obj_t *seg_hash, int device_fd, int offset, int length)
1854 retval = get_packet(device_fd, &tag, sizeof (fru_tag_t), offset);
1859 seg_hash->u.seg_obj->trailer_offset = offset;
1893 offset += tag_size;
1900 pkt_hash_obj->u.pkt_obj->payload_offset = offset;
1902 offset += paylen;
1910 offset);
1920 seg_hash->u.seg_obj->trailer_offset = offset;
1924 offset = seg_hash->u.seg_obj->segment.offset;
1927 offset + seg_limit + 1);
1933 seg_hash->u.seg_obj->trailer_offset = offset;
1960 uint16_t offset;
1982 offset = segment_object->segment.offset;
2003 pktcnt = get_packets(seg_hash, device_fd, offset,
2234 segment_offset = seg_hash->u.seg_obj->segment.offset;
2327 * if trailer offset is 0 than parse the segment data to get the trailer
2328 * offset to compute the remaining space left in the segment area for
2347 ((trailer_offset - seg_hash->u.seg_obj->segment.offset) +
2379 /* update the trailer offset */
2384 seg_hash->u.seg_obj->segment.offset));
2619 - seg_hash->u.seg_obj->segment.offset));
2620 /* write trailer at new offset */