X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=direct%2Fyaffs_packedtags.c;fp=direct%2Fyaffs_packedtags.c;h=0000000000000000000000000000000000000000;hp=6214a71cab33b541462425db788323df0012b4db;hb=6a4a7bfdb19f0d608d85f0103f90c6bbd265bf58;hpb=881c78ae305f916e083200e4ae5d027997fc15f5 diff --git a/direct/yaffs_packedtags.c b/direct/yaffs_packedtags.c deleted file mode 100644 index 6214a71..0000000 --- a/direct/yaffs_packedtags.c +++ /dev/null @@ -1,42 +0,0 @@ -#include "yaffs_packedtags.h" -#include - -void yaffs_PackTags(yaffs_PackedTags *pt, yaffs_ExtendedTags *t) -{ - pt->chunkId = t->chunkId; - pt->serialNumber = t->serialNumber; - pt->byteCount = t->byteCount; - pt->objectId = t->objectId; - pt->ecc = 0; - pt->deleted = (t->chunkDeleted) ? 0 : 1; - pt->unusedStuff = 0; - pt->shouldBeFF = 0xFFFFFFFF; - -} - -void yaffs_UnpackTags(yaffs_ExtendedTags *t, yaffs_PackedTags *pt) -{ - static __u8 allFF[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff}; - - if(memcmp(allFF,pt,sizeof(yaffs_PackedTags))) - { - t->blockBad = 0; - if(pt->shouldBeFF != 0xFFFFFFFF) - { - t->blockBad = 1; - } - t->chunkUsed = 1; - t->objectId = pt->objectId; - t->chunkId = pt->chunkId; - t->byteCount = pt->byteCount; - t->eccResult = YAFFS_ECC_RESULT_NO_ERROR; - t->chunkDeleted = (pt->deleted) ? 0 : 1; - t->serialNumber = pt->serialNumber; - } - else - { - memset(t,0,sizeof(yaffs_ExtendedTags)); - - } -} -