Patchwork [01/10] mtd-utils: nanddump: Allow 64-bit lengths

login
register
mail settings
Submitter Brian Norris
Date Nov. 3, 2010, 8:27 a.m.
Message ID <1288772847-8120-1-git-send-email-computersforpeace@gmail.com>
Download mbox | patch
Permalink /patch/69953/
State Accepted
Commit 98aa1a65683efcece1d172a9c2649b5d1d149a19
Headers show

Comments

Brian Norris - Nov. 3, 2010, 8:27 a.m.
We should allow the dump length to be 64-bit, especially since the value
was read in as a "long long" by strtoll().

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
---
 nanddump.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Mike Frysinger - Nov. 9, 2010, 9:54 a.m.
most of these changes look sane ... i commented on the ones that i
think need tweaking, but for the rest, Acked-by: Mike Frysinger
<vapier@gentoo.org>
-mike
Artem Bityutskiy - Nov. 13, 2010, 11:31 a.m.
On Wed, 2010-11-03 at 01:27 -0700, Brian Norris wrote:
> We should allow the dump length to be 64-bit, especially since the value
> was read in as a "long long" by strtoll().
> 
> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
> ---
>  nanddump.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/nanddump.c b/nanddump.c
> index 86a71c9..fe29596 100644
> --- a/nanddump.c
> +++ b/nanddump.c
> @@ -83,7 +83,7 @@ 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 unsigned long long	length;			// dump length
>  static const char		*mtddev;		// mtd device name
>  static const char		*dumpfile;		// dump file name
>  static bool			omitbad = false;

This patch does not apply. Which version of MTD utils do you use? This
change was done long time ago by the following commit:

commit b16c1b630491a461b3ebb55d714d7bb0cd122737
Author: Grant Erickson <gerickson@nuovations.com>
Date:   Sun Sep 7 20:45:21 2008 +0000

    nanddump: Qualifier Clean-up
    
    Static-qualified all globals except 'main' because they have no use
    beyond file scope.
    Constant-qualified MTD device and input positional parameter globals.
    Constant-qualified argv array.
    
    Signed-off-by: Grant Erickson <gerickson@nuovations.com>
    Acked-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
    Signed-off-by: Josh Boyer <jwboyer@gmail.com>

Forgot to git-pull ? :-))))
Artem Bityutskiy - Nov. 13, 2010, 11:37 a.m.
On Sat, 2010-11-13 at 13:31 +0200, Artem Bityutskiy wrote:
> Forgot to git-pull ? :-))))

Brian, ignore this e-mail please :-) I've just pushed this patch,
thanks!
Artem Bityutskiy - Nov. 13, 2010, 11:55 a.m.
On Wed, 2010-11-03 at 01:27 -0700, Brian Norris wrote:
> We should allow the dump length to be 64-bit, especially since the value
> was read in as a "long long" by strtoll().
> 
> Signed-off-by: Brian Norris <computersforpeace@gmail.com>

I've pushed whole series, thanks a lot!

Patch

diff --git a/nanddump.c b/nanddump.c
index 86a71c9..fe29596 100644
--- a/nanddump.c
+++ b/nanddump.c
@@ -83,7 +83,7 @@  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 unsigned long long	length;			// dump length
 static const char		*mtddev;		// mtd device name
 static const char		*dumpfile;		// dump file name
 static bool			omitbad = false;