X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=yaffs_tagscompat.c;h=ab756d06d0a9eb580ef520bd48265dc08e03e4f3;hp=d594d6193245ff7ae2f09c5ea063906c56bf7225;hb=e8cfe05cf0d057f6978c37943e51b17bb14664e3;hpb=e1ac494e05a5dc7ab61d799af815d103a11d318c diff --git a/yaffs_tagscompat.c b/yaffs_tagscompat.c index d594d61..ab756d0 100644 --- a/yaffs_tagscompat.c +++ b/yaffs_tagscompat.c @@ -14,6 +14,7 @@ #include "yaffs_guts.h" #include "yaffs_tagscompat.h" #include "yaffs_ecc.h" +#include "yaffs_getblockinfo.h" static void yaffs_HandleReadDataError(yaffs_Device * dev, int chunkInNAND); #ifdef NOTYET @@ -45,7 +46,7 @@ static const char yaffs_countBitsTable[256] = { 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8 }; -static int yaffs_CountBits(__u8 x) +int yaffs_CountBits(__u8 x) { int retVal; retVal = yaffs_countBitsTable[x]; @@ -438,7 +439,7 @@ int yaffs_TagsCompatabilityReadChunkWithTagsFromNAND(yaffs_Device * dev, yaffs_ECCResult eccResult; static yaffs_Spare spareFF; - static int init; + static int init = 0; if (!init) { memset(&spareFF, 0xFF, sizeof(spareFF)); @@ -497,9 +498,9 @@ int yaffs_TagsCompatabilityMarkNANDBlockBad(struct yaffs_DeviceStruct *dev, } int yaffs_TagsCompatabilityQueryNANDBlock(struct yaffs_DeviceStruct *dev, - int blockNo, yaffs_BlockState * - state, - int *sequenceNumber) + int blockNo, + yaffs_BlockState *state, + __u32 *sequenceNumber) { yaffs_Spare spare0, spare1;