This is just a minor addition; the trace message for when yaffs marks a
block bad doesn't have a newline on the end which causes output like:
nand_erase: attempt to erase a bad block at page 0x000223e0
**>> Erasure failed 4320
yaffs: marking block 4319 bad<4>**>> Block 4320 retired
The attached patch fixes that.
Also this set of messages is a bit confusing; the off by one appears to
be due to yaffs_MarkBlockBad taking account of the dev->blockOffset
field, but why does it do so when the other functions don't seem to?
J.
--
Another bad idea: Skinny dipping in the Elder Brain Pool.
This .sig brought to you by the letter V and the number 10
Product of the Republic of HuggieTag
Index: yaffs_mtdif1.c
===================================================================
RCS file: /home/aleph1/cvs/yaffs2/yaffs_mtdif1.c,v
retrieving revision 1.2
diff -u -r1.2 yaffs_mtdif1.c
--- yaffs_mtdif1.c 23 Jul 2007 19:14:04 -0000 1.2
+++ yaffs_mtdif1.c 23 Sep 2007 21:10:43 -0000
@@ -288,7 +288,7 @@
int blocksize = dev->nChunksPerBlock * dev->nDataBytesPerChunk;
int retval;
- yaffs_trace(YAFFS_TRACE_BAD_BLOCKS, "marking block %d bad", blockNo);
+ yaffs_trace(YAFFS_TRACE_BAD_BLOCKS, "marking block %d bad\n", blockNo);
retval = mtd->block_markbad(mtd, (loff_t)blocksize * blockNo);
return (retval) ? YAFFS_FAIL : YAFFS_OK;