2014-06-19 19:39 GMT+02:00 Baruch Siach <[email protected]>:
> Hi Richard,
>
> On Thu, Jun 19, 2014 at 05:59:11PM +0200, Richard Genoud wrote:
>> since mtd-utils 1.4.7, the omit bad block method has been removed.
>> (cf commit d8b8f780ec3c916f3990e9227d6bfbb22bf42ef8)
>>
>> Signed-off-by: Richard Genoud <[email protected]>
>> ---
>>  miscutils/nandwrite.c | 25 ++++++-------------------
>>  1 file changed, 6 insertions(+), 19 deletions(-)
>>
>
> [...]
>
>> -     if (IS_NANDDUMP) {
>> -            if ((opts & OPT_b) && (opts & OPT_bb))
>> -                    bb_show_usage();
>> -            if (opts & OPT_b)
>> -                    bb_method = BB_OMITBAD;
>> +     if (IS_NANDDUMP)
>>              if (opts & OPT_bb) {
>
> I'd combined these two into one condition (IS_NANDDUMP && opts & OPT_bb), and
> eliminate one indentation level below.
>
> baruch
yes,  that's right.
Thanks !

>
>>                      if (!strcmp("skipbad", opt_bb))
>>                              bb_method = BB_SKIPBAD;
>> @@ -166,7 +156,6 @@ int nandwrite_main(int argc UNUSED_PARAM, char **argv)
>>                      else
>>                              bb_show_usage();
>>              }
>> -     }
>>
>>       /* Pull it into a CPU register (hopefully) - smaller code that way */
>>       meminfo_writesize = meminfo.writesize;
>> @@ -200,7 +189,6 @@ int nandwrite_main(int argc UNUSED_PARAM, char **argv)
>>                               if (bb_method == BB_SKIPBAD) {
>>                                       end_addr += (tmp - blockstart);
>>                               }
>> -                             /* omitbad: do nothing */
>>                       }
>>                       mtdoffset = tmp;
>>               }
>> @@ -231,7 +219,6 @@ int nandwrite_main(int argc UNUSED_PARAM, char **argv)
>>                                               end_addr = ~0;
>>                                       limit = MIN(meminfo.size, end_addr);
>>                               }
>> -                             /* omitbad: do nothing */
>>                       }
>>                       if (mtdoffset >= limit)
>>                               break;
>
> --
>      http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
> =}------------------------------------------------ooO--U--Ooo------------{=
>    - [email protected] - tel: +972.2.679.5364, http://www.tkos.co.il -



-- 
for me, ck means con kolivas and not calvin klein... does it mean I'm a geek ?
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to