little mistake in nandwrite.c

Michael xemc at yahoo.com
Fri Jan 7 15:29:14 EST 2005


Hi.
I'm pretty sure I've found a small mistake in 'nandwrite.c'.

Relevant code block:  (mistake is 5 lines in)

        // force oob layout for jffs2 or yaffs ?
        if (forcejffs2 || forceyaffs) {
                struct nand_oobinfo *oobsel = forcejffs2 ?
&jffs2_oobinfo : &yaffs_oobinfo;

                if (forceyaffs && meminfo.oobsize == 8) {
                        if (forceyaffs) {
                                fprintf (stderr, "YAFSS cannot
operate on 256 Byte page size");
                                goto restoreoob;
                        }
                        /* Adjust number of ecc bytes */
                        jffs2_oobinfo.eccbytes = 3;
                }

                if (ioctl (fd, MEMSETOOBSEL, oobsel) != 0) {
                        perror ("MEMSETOOBSEL");
                        goto restoreoob;
                }
        }

Patch is attached.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nandwrite.c_patch
Type: application/octet-stream
Size: 439 bytes
Desc: nandwrite.c_patch
Url : http://lists.infradead.org/pipermail/linux-mtd/attachments/20050107/414ab697/attachment.obj 


More information about the linux-mtd mailing list