1 #include "yaffs_packedtags1.h"
4 void yaffs_PackTags1(yaffs_PackedTags1 *pt, const yaffs_ExtendedTags *t)
6 pt->chunkId = t->chunkId;
7 pt->serialNumber = t->serialNumber;
8 pt->byteCount = t->byteCount;
9 pt->objectId = t->objectId;
11 pt->deleted = (t->chunkDeleted) ? 0 : 1;
13 pt->shouldBeFF = 0xFFFFFFFF;
17 void yaffs_UnpackTags1(yaffs_ExtendedTags *t, const yaffs_PackedTags1 *pt)
19 static const __u8 allFF[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff};
21 if(memcmp(allFF,pt,sizeof(yaffs_PackedTags1)))
24 if(pt->shouldBeFF != 0xFFFFFFFF)
29 t->objectId = pt->objectId;
30 t->chunkId = pt->chunkId;
31 t->byteCount = pt->byteCount;
32 t->eccResult = YAFFS_ECC_RESULT_NO_ERROR;
33 t->chunkDeleted = (pt->deleted) ? 0 : 1;
34 t->serialNumber = pt->serialNumber;
38 memset(t,0,sizeof(yaffs_ExtendedTags));