summaryrefslogtreecommitdiff
path: root/yaffs_packedtags2.c
diff options
context:
space:
mode:
authorcharles <charles>2004-12-17 04:39:04 +0000
committercharles <charles>2004-12-17 04:39:04 +0000
commit37fd9ec3587b5c4d497a7682522a9adfab682e51 (patch)
tree75762aeb55cea32b8e2dcdc8f34708e54ef5bffd /yaffs_packedtags2.c
parentf216bcabdaf791aa93ad2e58c1d747d2d8bd6617 (diff)
*** empty log message ***
Diffstat (limited to '')
-rw-r--r--yaffs_packedtags2.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/yaffs_packedtags2.c b/yaffs_packedtags2.c
index f734882..97668dc 100644
--- a/yaffs_packedtags2.c
+++ b/yaffs_packedtags2.c
@@ -2,19 +2,33 @@
#include "yportenv.h"
+static void yaffs_DumpPackedTags2(const yaffs_PackedTags2 *pt)
+{
+ T(YAFFS_TRACE_MTD,(TSTR("packed tags obj %d chunk %d byte %d seq %d"TENDSTR),pt->t.objectId,pt->t.chunkId,pt->t.byteCount,pt->t.sequenceNumber));
+}
+
+static void yaffs_DumpTags2(const yaffs_ExtendedTags *t)
+{
+ T(YAFFS_TRACE_MTD,(TSTR("ext.tags eccres %d blkbad %d chused %d obj %d chunk%d byte %d del %d ser %d seq %d"TENDSTR),
+ t->eccResult, t->blockBad, t->chunkUsed, t->objectId, t->chunkId, t->byteCount, t->chunkDeleted, t->serialNumber, t->sequenceNumber));
+
+}
-void yaffs_PackTags2(yaffs_PackedTags2 *pt, yaffs_ExtendedTags *t)
+void yaffs_PackTags2(yaffs_PackedTags2 *pt, const yaffs_ExtendedTags *t)
{
pt->t.chunkId = t->chunkId;
pt->t.sequenceNumber = t->sequenceNumber;
pt->t.byteCount = t->byteCount;
pt->t.objectId = t->objectId;
+ yaffs_DumpPackedTags2(pt);
+ yaffs_DumpTags2(t);
+
yaffs_ECCCalculateOther((unsigned char *)&pt->t,sizeof(yaffs_PackedTags2TagsPart),&pt->ecc);
}
-void yaffs_UnpackTags2(yaffs_ExtendedTags *t, yaffs_PackedTags2 *pt)
+void yaffs_UnpackTags2(yaffs_ExtendedTags *t, const yaffs_PackedTags2 *pt)
{
@@ -38,5 +52,9 @@ void yaffs_UnpackTags2(yaffs_ExtendedTags *t, yaffs_PackedTags2 *pt)
t->serialNumber = 0;
t->sequenceNumber = pt->t.sequenceNumber;
}
+
+ yaffs_DumpPackedTags2(pt);
+ yaffs_DumpTags2(t);
+
}