Re: [U-Boot] [PATCH] nand_util: correct YAFFS image write function
On Sat, Jan 21, 2012 at 4:46 AM, Scott Wood wrote: > On 01/20/2012 12:17 AM, Kassey Lee wrote: >> hi, Lei, Scott: >> I think this is correct, >> do you have some comments ? > > Looks right. > > -Scott Also looks fine to me. Acked-by: Lei Wen Best regards, Lei ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] nand_util: correct YAFFS image write function
On 01/20/2012 12:17 AM, Kassey Lee wrote: > hi, Lei, Scott: > I think this is correct, > do you have some comments ? Looks right. -Scott ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] nand_util: correct YAFFS image write function
hi, Lei, Scott: I think this is correct, do you have some comments ? thanks! BR. Kassey 2012/1/18 Liu, Wentao : > In function nand_write_skip_bad(),for YAFFS filesystem part, > write_oob() will return 0 when success, so when rval equals 0, > it should continue to write the next page, and no break. > > Signed-off-by: Wentao, Liu > > diff --git a/drivers/mtd/nand/nand_util.c b/drivers/mtd/nand/nand_util.c > index 60c778e..7ed8b18 100644 > --- a/drivers/mtd/nand/nand_util.c > +++ b/drivers/mtd/nand/nand_util.c > @@ -564,7 +564,7 @@ int nand_write_skip_bad(nand_info_t *nand, loff_t offset, > size_t *length, > ops.oobbuf = ops.datbuf + pagesize; > > rval = nand->write_oob(nand, offset, &ops); > - if (!rval) > + if (rval != 0) > break; > > offset += pagesize; > -- > 1.7.4.1 > > ___ > U-Boot mailing list > U-Boot@lists.denx.de > http://lists.denx.de/mailman/listinfo/u-boot -- Best regards Kassey Intel Mobile Communication Xi'an, China PRC ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] nand_util: correct YAFFS image write function
In function nand_write_skip_bad(),for YAFFS filesystem part, write_oob() will return 0 when success, so when rval equals 0, it should continue to write the next page, and no break. Signed-off-by: Wentao, Liu diff --git a/drivers/mtd/nand/nand_util.c b/drivers/mtd/nand/nand_util.c index 60c778e..7ed8b18 100644 --- a/drivers/mtd/nand/nand_util.c +++ b/drivers/mtd/nand/nand_util.c @@ -564,7 +564,7 @@ int nand_write_skip_bad(nand_info_t *nand, loff_t offset, size_t *length, ops.oobbuf = ops.datbuf + pagesize; rval = nand->write_oob(nand, offset, &ops); - if (!rval) + if (rval != 0) break; offset += pagesize; -- 1.7.4.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot