From: Theodore Ts'o Date: Fri, 30 Nov 2001 10:51:30 +0000 (+0100) Subject: debugfs.c (finish_range, dump_blocks): Fixed bug in Andreas's > X-Git-Tag: WIP-20011130~3 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=e89818835bd458569aea315208528d4745fefc71;p=tools%2Fe2fsprogs.git debugfs.c (finish_range, dump_blocks): Fixed bug in Andreas's > 2GB support changes: you need to use %lld when printf'ing an long long variable. --- diff --git a/debugfs/ChangeLog b/debugfs/ChangeLog index ee60862..9c03f46 100644 --- a/debugfs/ChangeLog +++ b/debugfs/ChangeLog @@ -1,3 +1,9 @@ +2001-11-30 Theodore Tso + + * debugfs.c (finish_range, dump_blocks): Fixed bug in Andreas's > + 2GB support changes: you need to use %lld when printf'ing + an long long variable. + 2001-11-24 Theodore Tso * debugfs.8.in: Update manual page to document the set_super_value diff --git a/debugfs/debugfs.c b/debugfs/debugfs.c index 1f69a75..cc13b06 100644 --- a/debugfs/debugfs.c +++ b/debugfs/debugfs.c @@ -338,9 +338,9 @@ static void finish_range(struct list_blocks_struct *lb) else fprintf(lb->f, ", "); if (lb->first_block == lb->last_block) - fprintf(lb->f, "(%d):%d", lb->first_bcnt, lb->first_block); + fprintf(lb->f, "(%lld):%d", lb->first_bcnt, lb->first_block); else - fprintf(lb->f, "(%d-%d):%d-%d", lb->first_bcnt, + fprintf(lb->f, "(%lld-%lld):%d-%d", lb->first_bcnt, lb->last_bcnt, lb->first_block, lb->last_block); lb->first_block = 0; } @@ -402,7 +402,7 @@ static void dump_blocks(FILE *f, const char *prefix, ext2_ino_t inode) list_blocks_proc, (void *)&lb); finish_range(&lb); if (lb.total) - fprintf(f, "\n%sTOTAL: %d\n", prefix, lb.total); + fprintf(f, "\n%sTOTAL: %lld\n", prefix, lb.total); fprintf(f,"\n"); }