X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=yaffs_tagscompat.c;h=402537fb4ee1387132075c4247161bda4ab0d438;hp=1e0a1a1b195d583316b8e414e9642e80c2e779cb;hb=97f9eea27dc6b83fe55f9b86adbb5e4961ea921a;hpb=17b102ed84b24f9c45ebdba39cacc73eb39e8cae diff --git a/yaffs_tagscompat.c b/yaffs_tagscompat.c index 1e0a1a1..402537f 100644 --- a/yaffs_tagscompat.c +++ b/yaffs_tagscompat.c @@ -408,26 +408,25 @@ int yaffs_TagsCompatabilityWriteChunkWithTagsToNAND(yaffs_Device *dev, yaffs_SpareInitialise(&spare); - if (eTags->chunkDeleted) { + if (eTags->chunkDeleted) spare.pageStatus = 0; - } else { + else { tags.objectId = eTags->objectId; tags.chunkId = eTags->chunkId; tags.byteCountLSB = eTags->byteCount & 0x3ff; - if (dev->nDataBytesPerChunk >= 1024) { + if (dev->nDataBytesPerChunk >= 1024) tags.byteCountMSB = (eTags->byteCount >> 10) & 3; - } else { + else tags.byteCountMSB = 3; - } tags.serialNumber = eTags->serialNumber; - if (!dev->useNANDECC && data) { + if (!dev->useNANDECC && data) yaffs_CalcECC(data, &spare); - } + yaffs_LoadTagsIntoSpare(&spare, &tags); }