[PATCH 2/2] mtd-utils: nanddump: add 64-bit support, utilize libmtd

Mike Frysinger vapier.adi at gmail.com
Wed Oct 20 03:01:45 EDT 2010


On Wed, Oct 20, 2010 at 02:45, Brian Norris wrote:
> -static bool            pretty_print = false;   // print nice
> -static bool            noecc = false;          // don't error correct
> -static bool            noskipbad = false;      // don't skip bad blocks
> -static bool            omitoob = false;        // omit oob data
> -static unsigned long   start_addr;             // start address
> -static unsigned long   length;                 // dump length
> -static const char      *mtddev;                // mtd device name
> -static const char      *dumpfile;              // dump file name
> -static bool            omitbad = false;
> -static bool            quiet = false;          // suppress diagnostic output
> -static bool            canonical = false;      // print nice + ascii
> -static bool            forcebinary = false;    // force printing binary to tty
> +static bool                    pretty_print = false;   // print nice
> +static bool                    noecc = false;          // don't error correct
> +static bool                    noskipbad = false;      // don't skip bad blocks
> +static bool                    omitoob = false;        // omit oob data
> +static unsigned long long      start_addr;             // start address
> +static unsigned long           length;                 // dump length
> +static const char              *mtddev;                // mtd device name
> +static const char              *dumpfile;              // dump file name
> +static bool                    omitbad = false;
> +static bool                    quiet = false;          // suppress diagnostic output
> +static bool                    canonical = false;      // print nice + ascii
> +static bool                    forcebinary = false;    // force printing binary to tty

only one of these lines are functional.  please fold the rest into
your "style fixup" patch.

> @@ -318,7 +318,6 @@ int main(int argc, char * const argv[])
>
>                // autoplace ECC ?
>                if (old_oobinfo.useecc != MTD_NANDECC_AUTOPLACE) {
> -
>                        if (ioctl(fd, MEMSETOOBSEL, &autoplace_oobinfo) != 0) {
>                                perror("MEMSETOOBSEL");
>                                close(fd);

same here

> @@ -480,7 +479,7 @@ int main(int argc, char * const argv[])
>                        if (noskipbad)
>                                continue;
>                        do {
> -                               if ((ret = ioctl(fd, MEMGETBADBLOCK, &offs)) < 0) {
> +                               if ((ret = 0 /*ioctl(fd, MEMGETBADBLOCK, &offs)*/) < 0) {
>                                        perror("ioctl(MEMGETBADBLOCK)");
>                                        goto closeall;
>                                }

doesnt seem to belong.  then again, none of the changes to this file
look like they belong in this patch.
-mike


More information about the linux-mtd mailing list