Your patch NAND READ.JFFS2S
Hi,
you are right, the } has to be moved also.
So the correct patch is:
else if (cmdtail && !strncmp(cmdtail, ".jffs2s", 2)) {
cmd |= NANDRW_JFFS2; /* skip bad blocks (on read too) */
if (cmd & NANDRW_READ)
cmd |= NANDRW_JFFS2_SKIP; /* skip bad blocks (on read too) */
+ }
+ else if (cmdtail && !strncmp(cmdtail, ".jffs2", 2))
+ cmd |= NANDRW_JFFS2; /* skip bad blocks */
Best regards
Joachim
Quoted 25 lines · Frieder Ferlemann
Hi,
this patch looks suspect:
else if (cmdtail && !strncmp(cmdtail, ".jffs2s", 2)) { cmd |= NANDRW_JFFS2; /* skip bad blocks (on read too) */ if (cmd & NANDRW_READ) cmd |= NANDRW_JFFS2_SKIP; /* skip bad blocks (on read too) */ + else if (cmdtail && !strncmp(cmdtail, ".jffs2", 2)) + cmd |= NANDRW_JFFS2; /* skip bad blocks */ }fixing indentation it is:
else if (cmdtail && !strncmp(cmdtail, ".jffs2s", 2)) { cmd |= NANDRW_JFFS2; /* skip bad blocks (on read too) */ if (cmd & NANDRW_READ) cmd |= NANDRW_JFFS2_SKIP; /* skip bad blocks (on read too) */ + else if (cmdtail && !strncmp(cmdtail, ".jffs2", 2)) + cmd |= NANDRW_JFFS2; /* skip bad blocks */ }which you probably don't intend?
Signature · 7 lines
********************************************************* For more information: http://www.fsforth.de ********************************************************* Joachim Jaeger FS FORTH-SYSTEME GmbH Kueferstr. 8, D-79206 Breisach Phone: +49 (7667) 908-146, FAX +49 (7667) 908-246
[I'm not sure which message this is a Re: to, as I haven't seen any message(s) with this subject (yet?)]
Quoted 4 lines · In message <[email protected]> you wrote:
you are right, the } has to be moved also.
So the correct patch is:
Quoted 8 lines
else if (cmdtail && !strncmp(cmdtail, ".jffs2s", 2)) { cmd |= NANDRW_JFFS2; /* skip bad blocks (on read too) */ if (cmd & NANDRW_READ) cmd |= NANDRW_JFFS2_SKIP; /* skip bad blocks (onread too) */
+ }
+ else if (cmdtail && !strncmp(cmdtail, ".jffs2", 2))
+ cmd |=NANDRW_JFFS2; /* skip bad blocks */
I woould reject this because it is violating the coding style. ['}' and 'else' on the same line; indentation by TAB].
Hi Wolfgang,
Quoted 2 lines · Wolfgang Denk
[I'm not sure which message this is a Re: to, as I haven't seen any message(s) with this subject (yet?)]
my first message was sent at 10.03.05 11:00 o'clock to this list, where I reported the problem with the nand read.jffs2s command
Today I received a Re to this mail from Frieder, but the list not included. Because I wanted the list to know about the patch, I CCed the list within this mail.
Quoted 17 lines
Quoted 11 lines · In message <[email protected]> you wrote:
you are right, the } has to be moved also.
So the correct patch is:else if (cmdtail && !strncmp(cmdtail, ".jffs2s", 2)) { cmd |= NANDRW_JFFS2; /* skip bad blocks (on read too) */ if (cmd & NANDRW_READ) cmd |= NANDRW_JFFS2_SKIP; /* skip bad blocks (onread too) */
+ }
+ else if (cmdtail && !strncmp(cmdtail, ".jffs2", 2))
+ cmd |=NANDRW_JFFS2; /* skip bad blocks */
Quoted 2 lines
I woould reject this because it is violating the coding style. ['}' and 'else' on the same line; indentation by TAB].
Sorry for this violation, but I copied the parts from u-boot version 1.1.2 (cmd_nand.c):
if (cmdtail && !strncmp(cmdtail, ".oob", 2)) {
/* read out-of-band data */
if (cmd & NANDRW_READ) {
ret = nand_read_oob(nand_dev_desc + curr_device,
off, size, &total,
(u_char*)addr);
}
else {
ret = nand_write_oob(nand_dev_desc + curr_device,
off, size, &total,
(u_char*)addr);
}
return ret;
}
else if (cmdtail && !strncmp(cmdtail, ".jffs2", 2))
cmd |= NANDRW_JFFS2; /* skip bad blocks */
else if (cmdtail && !strncmp(cmdtail, ".jffs2s", 2)) {
cmd |= NANDRW_JFFS2; /* skip bad blocks (on read too) */
if (cmd & NANDRW_READ)
cmd |= NANDRW_JFFS2_SKIP; /* skip bad blocks (on read too) */
}So the patch should be:
else if (cmdtail && !strncmp(cmdtail, ".jffs2s", 2)) {
cmd |= NANDRW_JFFS2; /* skip bad blocks (on read too) */
if (cmd & NANDRW_READ)
cmd |= NANDRW_JFFS2_SKIP; /* skip bad blocks (on read too) */
+ } else if (cmdtail && !strncmp(cmdtail, ".jffs2", 2))
+ cmd |= NANDRW_JFFS2; /* skip bad blocks */
Quoted 1 line
Regards
Joachim
Quoted 13 lines
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users
Signature · 7 lines
********************************************************* For more information: http://www.fsforth.de ********************************************************* Joachim Jaeger FS FORTH-SYSTEME GmbH Kueferstr. 8, D-79206 Breisach Phone: +49 (7667) 908-146, FAX +49 (7667) 908-246
Quoted 7 lines · In message <[email protected]> you wrote:
Quoted 2 lines · Wolfgang Denk
[I'm not sure which message this is a Re: to, as I haven't seen any message(s) with this subject (yet?)]
my first message was sent at 10.03.05 11:00 o'clock to this list, where I reported the problem with the nand read.jffs2s command
I see -- but this was under a different subject. I wish people learned to quote correctly :-(
Quoted 3 lines
Today I received a Re to this mail from Frieder, but the list not included. Because I wanted the list to know about the patch, I CCed the list within this mail.
Thanks.
Quoted 2 lines
Sorry for this violation, but I copied the parts from u-boot version 1.1.2 (
cmd_nand.c):
...which should be fixed if there is a reason to touch that file.
Quoted 1 line
So the patch should be:
Can you please submit a proper patch, then? [and indicate that it obsoletes the previous one?] Thanks.
Best regards,
Wolfgang Denk
Signature · 5 lines
Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Without facts, the decision cannot be made logically. You must rely on your human intuition. -- Spock, "Assignment: Earth", stardate unknown
Hi,
please find enclosed the patch for the file cmd_nand.c (against u-boot-1.1.2), which makes the previous one obsolete:
nand read.jffs2s and nand read.i have been fixed
Best regards
Joachim
Quoted 13 lines · Wolfgang Denk
Quoted 2 lines · In message <[email protected]> you wrote:
Wolfgang Denk wrote:
Can you please submit a proper patch, then? [and indicate that it obsoletes the previous one?] Thanks.
Best regards,
Wolfgang Denk
Signature · 14 lines
********************************************************* For more information: http://www.fsforth.de ********************************************************* Joachim Jaeger FS FORTH-SYSTEME GmbH Kueferstr. 8, D-79206 Breisach Phone: +49 (7667) 908-146, FAX +49 (7667) 908-246 -------------- next part -------------- A non-text attachment was scrubbed... Name: cmd_nand.patch.tgz Type: application/x-gtar Size: 1380 bytes Desc: not available Url : http://lists.denx.de/pipermail/u-boot/attachments/20050318/69441db8/attachment.tgz