On Tuesday 12 October 2010 09:32, Baruch Siach wrote:
> Port of the mtd-utils nanddump utility. This nanddump implementation is added
> to nandwrite.c for the sake of code sharing.
> 
> Signed-off-by: Baruch Siach <[email protected]>

> +/* Buffer for OOB data */
> +#define NAND_MAX_OOBSIZE 256
> +static unsigned char oobbuf[NAND_MAX_OOBSIZE];

This is not good.

>       mtdoffset = bb_strtou(opt_s, NULL, 0);
>       if (errno)
>               bb_error_msg_and_die("invalid number '%s'", opt_s);
> +     if (do_nanddump && (opts & OPT_l)) {
> +             unsigned length = bb_strtou(opt_l, NULL, 0);
> +             if (errno)
> +                     bb_error_msg_and_die("invalid number '%s'", opt_l);

xstrtou(str, 0) will do "check and abort" internally.

Applied with some changes. Please try current git and let me know
if it doesn't work for you.

-- 
vda

_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to