In mkyaffs, the printf() of the blocks being erased and the blocks
that are damaged was using a format of "0x08%lx" instead of "0x%08lx",
so the value printed was prefixed with the constant "08" instead of
being set to a field width of 8. The attached patch fixes the problem.
-Frank
--
Frank Rowand <
frank_rowand@mvista.com>
MontaVista Software, Inc
diff -ruNp yaffs/utils/mkyaffs.c yaffs_new/utils/mkyaffs.c
--- yaffs/utils/mkyaffs.c 2003-03-12 11:54:07.000000000 -0800
+++ yaffs_new/utils/mkyaffs.c 2004-12-14 13:16:32.000000000 -0800
@@ -196,14 +196,14 @@ int main(int argc, char **argv)
if(countBits[oobbuf[5]] < 7)
{
- printf("Block at 0x08%lx is damaged and is not being formatted\n",addr);
+ printf("Block at 0x%08lx is damaged and is not being formatted\n",addr);
}
else
{
/* Erase this block */
erase.start = addr;
erase.length = meminfo.erasesize;
- printf("Erasing block at 0x08%lx\n",addr);
+ printf("Erasing block at 0x%08lx\n",addr);
if(ioctl(fd, MEMERASE, &erase) != 0)
{
perror("\nMTD Erase failure\n");