From 79286a23828ba34dd5f51ac63dab385a45f34a25 Mon Sep 17 00:00:00 2001 From: Jeff Mahoney Date: Mon, 29 Jul 2013 11:28:25 -0400 Subject: [PATCH] resize_reiserfs: fix > 8TB printf formatting When performing an offline resize of a file system that will grow beyond 8 TB, we see negative block counts: ReiserFS report: blocksize 4096 block count -1610612480 (1879048192) free blocks -1610702612 (1878982637) bitmap block count 0 (57344) The values are passed around appropriately but are printed incorrectly. Reported-by: Jimb Esser Signed-off-by: Jeff Mahoney --- resize_reiserfs/resize_reiserfs.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/resize_reiserfs/resize_reiserfs.c b/resize_reiserfs/resize_reiserfs.c index adebb28..14ae427 100644 --- a/resize_reiserfs/resize_reiserfs.c +++ b/resize_reiserfs/resize_reiserfs.c @@ -68,10 +68,10 @@ static void sb_report(struct reiserfs_super_block * sb1, { printf( "ReiserFS report:\n" - "blocksize %d\n" - "block count %d (%d)\n" - "free blocks %d (%d)\n" - "bitmap block count %d (%d)\n", + "blocksize %u\n" + "block count %u (%u)\n" + "free blocks %u (%u)\n" + "bitmap block count %u (%u)\n", get_sb_block_size(sb1), get_sb_block_count(sb1), get_sb_block_count(sb2), get_sb_free_blocks(sb1), get_sb_free_blocks(sb2), @@ -167,7 +167,7 @@ static int resizer_check_fs_size(reiserfs_filsys_t *fs, long long int new_size) if(!valid_offset(fs->fs_dev, offset)) { reiserfs_warning (stderr, "%s is of %lu blocks size only with " - "reiserfs of %d blocks\nsize on it. You are " + "reiserfs of %u blocks\nsize on it. You are " "trying to expand reiserfs up to %lu blocks " "size.\nYou probably forgot to expand your " "partition size.\n\n", fs->fs_file_name,