[U-Boot-Users] Re: Your patch NAND READ.JFFS2S

Joachim Jaeger jjaeger at fsforth.de
Wed Mar 16 15:53:25 CET 2005


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

Frieder Ferlemann wrote:
> 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?


-- 
*********************************************************
   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




More information about the U-Boot mailing list