[PATCH 4/4] nanddump: kill -b Omit bad block
Baruch Siach
baruch at tkos.co.il
Thu Jun 19 17:39:51 UTC 2014
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 <richard.genoud at gmail.com>
> ---
> 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
> 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------------{=
- baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
More information about the busybox
mailing list