1 #include "yaffs_packedtags2.h"
6 void yaffs_PackTags2(yaffs_PackedTags2 *pt, yaffs_ExtendedTags *t)
8 pt->t.chunkId = t->chunkId;
9 pt->t.sequenceNumber = t->sequenceNumber;
10 pt->t.byteCount = t->byteCount;
11 pt->t.objectId = t->objectId;
13 yaffs_ECCCalculateOther((unsigned char *)&pt->t,sizeof(yaffs_PackedTags2TagsPart),&pt->ecc);
17 void yaffs_UnpackTags2(yaffs_ExtendedTags *t, yaffs_PackedTags2 *pt)
21 if(pt->t.sequenceNumber == 0xFFFFFFFF)
23 memset(t,0,sizeof(yaffs_ExtendedTags));
30 yaffs_ECCCalculateOther((unsigned char *)&pt->t,sizeof(yaffs_PackedTags2TagsPart),&ecc);
31 t->eccResult = yaffs_ECCCorrectOther((unsigned char *)&pt->t,sizeof(yaffs_PackedTags2TagsPart),&pt->ecc,&ecc);
34 t->objectId = pt->t.objectId;
35 t->chunkId = pt->t.chunkId;
36 t->byteCount = pt->t.byteCount;
39 t->sequenceNumber = pt->t.sequenceNumber;