enable dumpe2fs 64-bitness and fix printf formats.
PATCH 4/6 enable dumpe2fs 64-bitness and fix printf formats.
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 <[email protected]>
--- misc/dumpe2fs.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
misc/dumpe2fs.c +4 -4
@@ -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)
Signature · 1 line
1.6.0.6
Quoted 43 lines · Nick Dokos
Add
EXT2_FLAG_NEW_BITMAPSto theext2fs_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 <[email protected]>--- misc/dumpe2fs.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)misc/dumpe2fs.c +4
-4@@ -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)Signature · 1 line
1.6.0.6
Signed-off-by Valerie Aurora (Henson) <[email protected]>
-VAL