In the original YAFFS tree, I think there's a bug in that an assumption is made that there are 32 chunks per block in the test of the return from yaffs_FindAndDeleteChunkInFile(). Should this be changed to: chunkId = yaffs_FindAndDeleteChunkInFile(in,i,NULL); if(chunkId < (dev->internalStartBlock * dev->nChunksPerBlock) || chunkId >= ((dev->internalEndBlock+1) * dev->nChunksPerBlock)) { //T(("Found daft chunkId %d for %d\n",chunkId,i)); } ??? -- Peter Barada