summaryrefslogtreecommitdiff
path: root/yaffs_packedtags2.c
diff options
context:
space:
mode:
authorcharles <charles>2005-07-18 23:16:04 +0000
committercharles <charles>2005-07-18 23:16:04 +0000
commit28d4bda659460575eb5fcf7de394209531f1a950 (patch)
treea0bb9a659026c79b15bf54c413c6bf096de5e785 /yaffs_packedtags2.c
parent2cc385c407103563e3074d3664d5cad56812ace6 (diff)
Some improvements to garbage collection and st_xxx to yst_xxx changes
Diffstat (limited to 'yaffs_packedtags2.c')
-rw-r--r--yaffs_packedtags2.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/yaffs_packedtags2.c b/yaffs_packedtags2.c
index 01e23a7..342e550 100644
--- a/yaffs_packedtags2.c
+++ b/yaffs_packedtags2.c
@@ -89,8 +89,11 @@ void yaffs_PackTags2(yaffs_PackedTags2 *pt, const yaffs_ExtendedTags *t)
yaffs_DumpPackedTags2(pt);
yaffs_DumpTags2(t);
- yaffs_ECCCalculateOther((unsigned char *)&pt->t,sizeof(yaffs_PackedTags2TagsPart),&pt->ecc);
-
+#ifndef YAFFS_IGNORE_TAGS_ECC
+ {
+ yaffs_ECCCalculateOther((unsigned char *)&pt->t,sizeof(yaffs_PackedTags2TagsPart),&pt->ecc);
+ }
+#endif
}
void yaffs_UnpackTags2(yaffs_ExtendedTags *t, yaffs_PackedTags2 *pt)
@@ -104,9 +107,17 @@ void yaffs_UnpackTags2(yaffs_ExtendedTags *t, yaffs_PackedTags2 *pt)
if(pt->t.sequenceNumber != 0xFFFFFFFF)
{
// Page is in use
- yaffs_ECCOther ecc;
- yaffs_ECCCalculateOther((unsigned char *)&pt->t,sizeof(yaffs_PackedTags2TagsPart),&ecc);
- t->eccResult = yaffs_ECCCorrectOther((unsigned char *)&pt->t,sizeof(yaffs_PackedTags2TagsPart),&pt->ecc,&ecc);
+#ifdef YAFFS_IGNORE_TAGS_ECC
+ {
+ t->eccResult = 0;
+ }
+#else
+ {
+ yaffs_ECCOther ecc;
+ yaffs_ECCCalculateOther((unsigned char *)&pt->t,sizeof(yaffs_PackedTags2TagsPart),&ecc);
+ t->eccResult = yaffs_ECCCorrectOther((unsigned char *)&pt->t,sizeof(yaffs_PackedTags2TagsPart),&pt->ecc,&ecc);
+ }
+#endif
t->blockBad = 0;
t->chunkUsed = 1;
t->objectId = pt->t.objectId;