linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 4/6] [64-bit] enable dumpe2fs 64-bitness and fix printf formats.
@ 2009-05-01  8:47 Nick Dokos
  2009-05-04  6:21 ` Valerie Aurora
  0 siblings, 1 reply; 2+ messages in thread
From: Nick Dokos @ 2009-05-01  8:47 UTC (permalink / raw)
  To: linux-ext4; +Cc: nicholas.dokos, Theodore Ts'o, Valerie Aurora

Add  EXT2_FLAG_NEW_BITMAPS to the ext2fs_open() flags.

Change signature of print_range(): both arguments of the range
are now unsigned long long, with the concomitant change to the
printf formats.

Signed-off-by: Nick Dokos <nicholas.dokos@hp.com>
---
 misc/dumpe2fs.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/misc/dumpe2fs.c b/misc/dumpe2fs.c
index 8a746ee..4d5c90e 100644
--- a/misc/dumpe2fs.c
+++ b/misc/dumpe2fs.c
@@ -63,12 +63,12 @@ static void print_number(unsigned long num)
 		printf("%lu", num);
 }
 
-static void print_range(unsigned long a, unsigned long b)
+static void print_range(unsigned long long a, unsigned long long b)
 {
 	if (hex_format)
-		printf("0x%04lx-0x%04lx", a, b);
+		printf("0x%llx-0x%llx", a, b);
 	else
-		printf("%lu-%lu", a, b);
+		printf("%llu-%llu", a, b);
 }
 
 static void print_free (unsigned long group, char * bitmap,
@@ -481,7 +481,7 @@ int main (int argc, char ** argv)
 	if (optind > argc - 1)
 		usage();
 	device_name = argv[optind++];
-	flags = EXT2_FLAG_JOURNAL_DEV_OK | EXT2_FLAG_SOFTSUPP_FEATURES;
+	flags = EXT2_FLAG_JOURNAL_DEV_OK | EXT2_FLAG_SOFTSUPP_FEATURES | EXT2_FLAG_NEW_BITMAPS;
 	if (force)
 		flags |= EXT2_FLAG_FORCE;
 	if (image_dump)
-- 
1.6.0.6


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 4/6] [64-bit] enable dumpe2fs 64-bitness and fix printf formats.
  2009-05-01  8:47 [PATCH 4/6] [64-bit] enable dumpe2fs 64-bitness and fix printf formats Nick Dokos
@ 2009-05-04  6:21 ` Valerie Aurora
  0 siblings, 0 replies; 2+ messages in thread
From: Valerie Aurora @ 2009-05-04  6:21 UTC (permalink / raw)
  To: Nick Dokos; +Cc: linux-ext4, Theodore Ts'o

On Fri, May 01, 2009 at 04:47:07AM -0400, Nick Dokos wrote:
> Add  EXT2_FLAG_NEW_BITMAPS to the ext2fs_open() flags.
> 
> Change signature of print_range(): both arguments of the range
> are now unsigned long long, with the concomitant change to the
> printf formats.
> 
> Signed-off-by: Nick Dokos <nicholas.dokos@hp.com>
> ---
>  misc/dumpe2fs.c |    8 ++++----
>  1 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/misc/dumpe2fs.c b/misc/dumpe2fs.c
> index 8a746ee..4d5c90e 100644
> --- a/misc/dumpe2fs.c
> +++ b/misc/dumpe2fs.c
> @@ -63,12 +63,12 @@ static void print_number(unsigned long num)
>  		printf("%lu", num);
>  }
>  
> -static void print_range(unsigned long a, unsigned long b)
> +static void print_range(unsigned long long a, unsigned long long b)
>  {
>  	if (hex_format)
> -		printf("0x%04lx-0x%04lx", a, b);
> +		printf("0x%llx-0x%llx", a, b);
>  	else
> -		printf("%lu-%lu", a, b);
> +		printf("%llu-%llu", a, b);
>  }
>  
>  static void print_free (unsigned long group, char * bitmap,
> @@ -481,7 +481,7 @@ int main (int argc, char ** argv)
>  	if (optind > argc - 1)
>  		usage();
>  	device_name = argv[optind++];
> -	flags = EXT2_FLAG_JOURNAL_DEV_OK | EXT2_FLAG_SOFTSUPP_FEATURES;
> +	flags = EXT2_FLAG_JOURNAL_DEV_OK | EXT2_FLAG_SOFTSUPP_FEATURES | EXT2_FLAG_NEW_BITMAPS;
>  	if (force)
>  		flags |= EXT2_FLAG_FORCE;
>  	if (image_dump)
> -- 
> 1.6.0.6
> 

Signed-off-by: Valerie Aurora (Henson) <vaurora@redhat.com>

-VAL

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-05-04  6:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-01  8:47 [PATCH 4/6] [64-bit] enable dumpe2fs 64-bitness and fix printf formats Nick Dokos
2009-05-04  6:21 ` Valerie Aurora

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).