diff options
author | Vitaliy Filippov <vitalif@yourcmc.ru> | 2014-05-26 12:08:35 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2014-05-27 12:12:05 -0400 |
commit | 7133644eec17768ceddcbc97d42d3b242ab692e3 (patch) | |
tree | 780157e7ad1facd4821d4712845652e57e1b4092 /misc | |
parent | 2eb0ed09d968ac86d9c6e241d3c78e7d4395383a (diff) | |
download | e2fsprogs-7133644eec17768ceddcbc97d42d3b242ab692e3.tar.gz |
misc: use unsigned long long for file block count in filefrag
This patch fixes incorrect reporting of file block count on 32-bit platforms.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'misc')
-rw-r--r-- | misc/filefrag.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/misc/filefrag.c b/misc/filefrag.c index 929a33bc..0abfb8ca 100644 --- a/misc/filefrag.c +++ b/misc/filefrag.c @@ -339,7 +339,7 @@ static void frag_report(const char *filename) ext2fs_struct_stat st; int blk_shift; long fd; - unsigned long numblocks; + unsigned long long numblocks; int data_blocks_per_cyl = 1; int num_extents = 1, expected = ~0; int is_ext2 = 0; @@ -411,7 +411,7 @@ static void frag_report(const char *filename) if (width > logical_width) logical_width = width; if (verbose) - printf("File size of %s is %llu (%lu block%s of %d bytes)\n", + printf("File size of %s is %llu (%llu block%s of %d bytes)\n", filename, (unsigned long long)st.st_size, numblocks * fsinfo.f_bsize >> blk_shift, numblocks == 1 ? "" : "s", 1 << blk_shift); |