• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10.1/hfs-285/fsck_hfs/dfalib/

Lines Matching refs:srcDesc

195     BTNodeDescriptor *srcDesc = src->buffer;
221 srcDesc->fLink = SWAP_BE32 (srcDesc->fLink);
222 srcDesc->bLink = SWAP_BE32 (srcDesc->bLink);
223 if (srcDesc->fLink >= btcb->totalNodes) {
224 if (debug) plog("hfs_swap_BTNode: invalid forward link (0x%08X)\n", srcDesc->fLink);
226 if (srcDesc->bLink >= btcb->totalNodes) {
227 if (debug) plog("hfs_swap_BTNode: invalid backward link (0x%08X)\n", srcDesc->bLink);
231 * Don't swap srcDesc->kind or srcDesc->height because they are only one byte.
235 if (srcDesc->kind < kBTLeafNode || srcDesc->kind > kBTMapNode) {
236 if (debug) plog("hfs_swap_BTNode: invalid node kind (%d)\n", srcDesc->kind);
238 if (srcDesc->height > btcb->treeDepth) {
239 if (debug) plog("hfs_swap_BTNode: invalid node height (%d)\n", srcDesc->height);
242 /* Don't swap srcDesc->reserved */
244 srcDesc->numRecords = SWAP_BE16 (srcDesc->numRecords);
249 srcOffs = (UInt16 *)((char *)src->buffer + (src->blockSize - ((srcDesc->numRecords + 1) * sizeof (UInt16))));
256 if (debug) plog("hfs_swap_BTNode: invalid record count (0x%04X)\n", srcDesc->numRecords);
265 for (i = 0; i <= srcDesc->numRecords; i++) {
275 if (debug) plog("hfs_swap_BTNode: record #%d invalid offset (0x%04X)\n", srcDesc->numRecords-i-1, srcOffs[i]);
287 srcDesc->numRecords-i-1, srcDesc->numRecords-i, srcOffs[i], srcOffs[i-1]);
298 if ((srcDesc->kind == kBTIndexNode) ||
299 (srcDesc-> kind == kBTLeafNode)) {
309 } else if (srcDesc-> kind == kBTMapNode) {
312 } else if (srcDesc-> kind == kBTHeaderNode) {
348 if (srcDesc->fLink >= btcb->totalNodes) {
349 if (debug) plog("hfs_UNswap_BTNode: invalid forward link (0x%08X)\n", srcDesc->fLink);
351 if (srcDesc->bLink >= btcb->totalNodes) {
352 if (debug) plog("hfs_UNswap_BTNode: invalid backward link (0x%08X)\n", srcDesc->bLink);
354 srcDesc->fLink = SWAP_BE32 (srcDesc->fLink);
355 srcDesc->bLink = SWAP_BE32 (srcDesc->bLink);
358 * Don't swap srcDesc->kind or srcDesc->height because they are only one byte.
362 if (srcDesc->kind < kBTLeafNode || srcDesc->kind > kBTMapNode) {
363 if (debug) plog("hfs_UNswap_BTNode: invalid node kind (%d)\n", srcDesc->kind);
365 if (srcDesc->height > btcb->treeDepth) {
366 if (debug) plog("hfs_UNswap_BTNode: invalid node height (%d)\n", srcDesc->height);
369 /* Don't swap srcDesc->reserved */
374 srcOffs = (UInt16 *)((char *)src->buffer + (src->blockSize - ((srcDesc->numRecords + 1) * sizeof (UInt16))));
381 if (debug) plog("hfs_UNswap_BTNode: invalid record count (0x%04X)\n", srcDesc->numRecords);
390 for (i = 0; i <= srcDesc->numRecords; i++) {
398 if (debug) plog("hfs_UNswap_BTNode: record #%d invalid offset (0x%04X)\n", srcDesc->numRecords-i-1, srcOffs[i]);
408 if ((i < srcDesc->numRecords) && (srcOffs[i+1] >= srcOffs[i])) {
410 srcDesc->numRecords-i-2, srcDesc->numRecords-i-1, srcOffs[i+1], srcOffs[i]);
419 srcDesc->numRecords = SWAP_BE16 (srcDesc->numRecords);
439 BTNodeDescriptor *srcDesc = src->buffer;
440 UInt16 *srcOffs = (UInt16 *)((char *)src->buffer + (src->blockSize - (srcDesc->numRecords * sizeof (UInt16))));
450 if (srcDesc->kind == kBTIndexNode)
455 for (i = 0; i < srcDesc->numRecords; i++) {
473 if (debug) plog("hfs_swap_HFSPlusBTInternalNode: extents key #%d offset too big (0x%04X)\n", srcDesc->numRecords-i-1, srcOffs[i]);
481 if (debug) plog("hfs_swap_HFSPlusBTInternalNode: extents key #%d invalid length (%d)\n", srcDesc->numRecords-i-1, srcKey->keyLength);
495 if (srcDesc->kind == kBTIndexNode) {
512 for (i = 0; i < srcDesc->numRecords; i++) {
526 if (debug) plog("hfs_swap_HFSPlusBTInternalNode: catalog key #%d offset too big (0x%04X)\n", srcDesc->numRecords-i-1, srcOffs[i]);
542 if (debug) plog("hfs_swap_HFSPlusBTInternalNode: catalog key #%d invalid length (%d)\n", srcDesc->numRecords-i-1, keyLength);
553 if (debug) plog("hfs_swap_HFSPlusBTInternalNode: catalog key #%d too big\n", srcDesc->numRecords-i-1);
571 unsigned recordIndex = srcDesc->numRecords - i;
594 if (srcDesc->kind == kBTIndexNode) {
606 if (debug) plog("hfs_swap_HFSPlusBTInternalNode: catalog folder record #%d too big\n", srcDesc->numRecords-i-1);
640 if (debug) plog("hfs_swap_HFSPlusBTInternalNode: catalog file record #%d too big\n", srcDesc->numRecords-i-1);
688 if (debug) plog("hfs_swap_HFSPlusBTInternalNode: catalog thread record #%d too big\n", srcDesc->numRecords-i-1);
705 if (debug) plog("hfs_swap_HFSPlusBTInternalNode: catalog thread record #%d name too big\n", srcDesc->numRecords-i-1);
717 if (debug) plog("hfs_swap_HFSPlusBTInternalNode: unrecognized catalog record type (0x%04X; record #%d)\n", srcPtr[0], srcDesc->numRecords-i-1);
731 for (i = 0; i < srcDesc->numRecords; i++) {
744 if (debug) plog("hfs_swap_HFSPlusBTInternalNode: attr key #%d offset too big (0x%04X)\n", srcDesc->numRecords-i-1, srcOffs[i]);
762 if (debug) plog("hfs_swap_HFSPlusBTInternalNode: attr key #%d too big (%d)\n", srcDesc->numRecords-i-1, keyLength);
777 if (debug) plog("hfs_swap_HFSPlusBTInternalNode: attr key #%d keyLength=%d attrNameLen=%d\n", srcDesc->numRecords-i-1, keyLength, srcKey->attrNameLen);
790 if (srcDesc->kind == kBTIndexNode) {
802 if (debug) plog("hfs_swap_HFSPlusBTInternalNode: attr inline #%d too big\n", srcDesc->numRecords-i-1);
818 if (debug) plog("hfs_swap_HFSPlusBTInternalNode: attr inline #%d too big (attrSize=%u)\n", srcDesc->numRecords-i-1, attrSize);
829 if (debug) plog("hfs_swap_HFSPlusBTInternalNode: attr fork data #%d too big\n", srcDesc->numRecords-i-1);
842 if (debug) plog("hfs_swap_HFSPlusBTInternalNode: attr extents #%d too big\n", srcDesc->numRecords-i-1);
878 BTNodeDescriptor *srcDesc = src->buffer;
879 UInt16 *srcOffs = (UInt16 *)((char *)src->buffer + (src->blockSize - (srcDesc->numRecords * sizeof (UInt16))));
890 if (srcDesc->kind == kBTIndexNode)
895 for (i = 0; i < srcDesc->numRecords; i++) {
913 if (debug) plog("hfs_swap_HFSBTInternalNode: extents key #%d offset too big (0x%04X)\n", srcDesc->numRecords-i-1, srcOffs[i]);
920 if (debug) plog("hfs_swap_HFSBTInternalNode: extents key #%d invalid length (%d)\n", srcDesc->numRecords-i-1, srcKey->keyLength);
931 if (srcDesc->kind == kBTIndexNode) {
948 for (i = 0; i < srcDesc->numRecords; i++) {
966 if (debug) plog("hfs_swap_HFSBTInternalNode: catalog key #%d offset too big (0x%04X)\n", srcDesc->numRecords-i-1, srcOffs[i]);
973 if (debug) plog("hfs_swap_HFSBTInternalNode: catalog key #%d invalid length (%d)\n", srcDesc->numRecords-i-1, srcKey->keyLength);
983 if (srcDesc->kind == kBTIndexNode)
989 srcDesc->numRecords-i, srcKey->keyLength, expectedKeyLength);
1002 if (debug) plog("hfs_swap_HFSBTInternalNode: catalog key #%d too big\n", srcDesc->numRecords-i-1);
1011 if (srcDesc->kind == kBTIndexNode) {
1023 if (debug) plog("hfs_swap_HFSBTInternalNode: catalog folder record #%d too big\n", srcDesc->numRecords-i-1);
1045 if (debug) plog("hfs_swap_HFSBTInternalNode: catalog file record #%d too big\n", srcDesc->numRecords-i-1);
1087 if (debug) plog("hfs_swap_HFSBTInternalNode: catalog thread record #%d too big\n", srcDesc->numRecords-i-1);
1100 if (debug) plog("hfs_swap_HFSBTInternalNode: catalog thread record #%d name too big\n", srcDesc->numRecords-i-1);
1105 if (debug) plog("hfs_swap_HFSBTInternalNode: unrecognized catalog record type (0x%04X; record #%d)\n", srcPtr[0], srcDesc->numRecords-i-1);