- pt->t.chunkId = t->chunkId;
- pt->t.sequenceNumber = t->sequenceNumber;
- pt->t.byteCount = t->byteCount;
- pt->t.objectId = t->objectId;
-
- yaffs_DumpPackedTags2(pt);
+ ptt->chunkId = t->chunkId;
+ ptt->sequenceNumber = t->sequenceNumber;
+ ptt->byteCount = t->byteCount;
+ ptt->objectId = t->objectId;
+
+ if (t->chunkId == 0 && t->extraHeaderInfoAvailable) {
+ /* Store the extra header info instead */
+ /* We save the parent object in the chunkId */
+ ptt->chunkId = EXTRA_HEADER_INFO_FLAG
+ | t->extraParentObjectId;
+ if (t->extraIsShrinkHeader)
+ ptt->chunkId |= EXTRA_SHRINK_FLAG;
+ if (t->extraShadows)
+ ptt->chunkId |= EXTRA_SHADOWS_FLAG;
+
+ ptt->objectId &= ~EXTRA_OBJECT_TYPE_MASK;
+ ptt->objectId |=
+ (t->extraObjectType << EXTRA_OBJECT_TYPE_SHIFT);
+
+ if (t->extraObjectType == YAFFS_OBJECT_TYPE_HARDLINK)
+ ptt->byteCount = t->extraEquivalentObjectId;
+ else if (t->extraObjectType == YAFFS_OBJECT_TYPE_FILE)
+ ptt->byteCount = t->extraFileLength;
+ else
+ ptt->byteCount = 0;
+ }
+
+ yaffs_DumpPackedTags2TagsPart(ptt);