Lines Matching defs:entries

1213    attribute header, attribute entries, and attribute data.
1261 * size supported (including the attribute entries). All of
1262 * the attribute entries must reside within this limit. If
1290 u_int16_t numEntries; /* number of entries which follow */
1291 apple_double_entry_t entries[2]; /* 'finfo' & 'rsrc' always exist */
1308 /* Header + entries must fit into 64K. Data may extend beyond 64K. */
1313 u_int32_t total_size; /* file offset of end of attribute header + entries + data */
1429 * - number of entries
1449 if (rawsize < offsetof(apple_double_header_t, entries))
1465 /* Calculate where the entries[] array ends */
1466 header_end = offsetof(apple_double_header_t, entries) +
1469 /* Is the file big enough to contain the AppleDouble entries? */
1477 header->entries[i].type = SWAP32(header->entries[i].type);
1478 header->entries[i].offset = SWAP32(header->entries[i].offset);
1479 header->entries[i].length = SWAP32(header->entries[i].length);
1481 entry_end = header->entries[i].offset + header->entries[i].length;
1488 if (header->entries[i].offset < header_end ||
1489 entry_end < header->entries[i].offset ||
1505 if (entry_end > header->entries[j].offset &&
1506 header->entries[j].offset + header->entries[j].length > header->entries[i].offset) {
1973 /* Only write the entries, since the data was written separately. */
2092 * shifting the entries after the resource fork.
2668 * Read in and parse the AppleDouble header and entries, and the extended
2669 * attribute header and entries if any. Populates the fields of ainfop
2670 * based on the headers and entries found.
2674 * AppleDouble entries, the extended attribute header, and extended
2675 * attribute entries must lie within this part of the file; the rest of
2679 * entries).
2680 * - Find the Finder Info and Resource Fork entries, if any.
2684 * - Swap and sanity check the extended attribute header and entries (if any).
2747 /* Find the Finder Info and Resource Fork entries, if any */
2749 if (filehdr->entries[i].type == AD_FINDERINFO &&
2750 filehdr->entries[i].length >= FINDERINFOSIZE) {
2752 ainfop->finderinfo = &filehdr->entries[i];
2770 if (filehdr->entries[i].type == AD_RESOURCE) {
2776 if (filehdr->entries[i].length == 0 && !setting)
2785 if (filehdr->entries[i].length == sizeof(rsrcfork_header_t) && !setting) {
2794 uio_setoffset(rf_uio, filehdr->entries[i].offset + 16);
2803 ainfop->rsrcfork = &filehdr->entries[i];
2820 * - Swap and sanity check the extended attribute header and entries
2824 ainfop->finderinfo == &filehdr->entries[0] &&
2825 ainfop->rsrcfork == &filehdr->entries[1] &&
2838 delta = ATTR_BUF_SIZE - (filehdr->entries[0].offset + FINDERINFOSIZE);
2839 if (ainfop->rsrcfork && filehdr->entries[1].length) {
2842 filehdr->entries[1].offset,
2843 filehdr->entries[1].length,
2850 vnode_setsize(xvp, filehdr->entries[1].offset + delta, 0, context);
2856 rsrcforkhdr = (rsrcfork_header_t *)((char *)filehdr + filehdr->entries[1].offset + delta);
2861 filehdr->entries[1].length = sizeof(rsrcfork_header_t);
2864 filehdr->entries[0].length += delta;
2865 filehdr->entries[1].offset += delta;
2870 attrhdr->total_size = filehdr->entries[1].offset;
2892 * entries (if any). The Finder Info content must be big enough
2905 ainfop->finderinfo == &filehdr->entries[0] &&
2949 xah->appledouble.entries[0].type = SWAP32 (AD_FINDERINFO);
2950 xah->appledouble.entries[0].offset = SWAP32 (offsetof(apple_double_header_t, finfo));
2951 xah->appledouble.entries[0].length = SWAP32 (ATTR_BUF_SIZE - offsetof(apple_double_header_t, finfo) - rsrcforksize);
2952 xah->appledouble.entries[1].type = SWAP32 (AD_RESOURCE);
2953 xah->appledouble.entries[1].offset = SWAP32 (ATTR_BUF_SIZE - rsrcforksize);
2954 xah->appledouble.entries[1].length = SWAP32 (rsrcforksize);
3040 adh->entries[i].type = SWAP32 (adh->entries[i].type);
3041 adh->entries[i].offset = SWAP32 (adh->entries[i].offset);
3042 adh->entries[i].length = SWAP32 (adh->entries[i].length);
3152 * variable-sized attribute entries.
3154 * XXX Is there any guarantee that attribute entries are stored in