* {PATCH] e2fsprogs: fix printf format in print_blocks_proc()
@ 2014-05-29 18:09 Eric Sandeen
0 siblings, 0 replies; only message in thread
From: Eric Sandeen @ 2014-05-29 18:09 UTC (permalink / raw)
To: ext4 development
blockcnt is of type e2_blkcnt_t, which is:
typedef __s64 __bitwise e2_blkcnt_t;
so use %lld not %d to print it.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
diff --git a/lib/ext2fs/tst_libext2fs.c b/lib/ext2fs/tst_libext2fs.c
index 1f63eb7..b4fb7f2 100644
--- a/lib/ext2fs/tst_libext2fs.c
+++ b/lib/ext2fs/tst_libext2fs.c
@@ -37,7 +37,7 @@ static int print_blocks_proc(ext2_filsys fs EXT2FS_ATTR((unused)),
blk64_t ref_block, int ref_offset,
void *private EXT2FS_ATTR((unused)))
{
- printf("%6d %8llu (%d %llu)\n", blockcnt, *blocknr,
+ printf("%6lld %8llu (%d %llu)\n", (long long)blockcnt, *blocknr,
ref_offset, ref_block);
return 0;
}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-05-29 18:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-29 18:09 {PATCH] e2fsprogs: fix printf format in print_blocks_proc() Eric Sandeen
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).