From 636a954a308aec91cf644f566d3e8a794a5dd8cb Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Fri, 29 Jun 2001 17:57:26 -0400 Subject: [PATCH] Use long long to calculate the percentage of the number of blocks in use in the filesystem. --- e2fsck/ChangeLog | 5 +++++ e2fsck/unix.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/e2fsck/ChangeLog b/e2fsck/ChangeLog index 0de5b4e..ea0e6fb 100644 --- a/e2fsck/ChangeLog +++ b/e2fsck/ChangeLog @@ -1,3 +1,8 @@ +2001-06-29 Theodore Tso + + * unix.c (show_stats): Use long long to calculate the percentage + of the number of blocks in use in the filesystem. + 2001-06-23 Theodore Tso * Release of E2fsprogs 1.22 diff --git a/e2fsck/unix.c b/e2fsck/unix.c index 816f3ce..6710839 100644 --- a/e2fsck/unix.c +++ b/e2fsck/unix.c @@ -130,7 +130,8 @@ static void show_stats(e2fsck_t ctx) ctx->fs_ind_count, ctx->fs_dind_count, ctx->fs_tind_count); printf (_("%8d blocks used (%d%%)\n" "%8d bad blocks\n"), blocks_used, - 100 * blocks_used / blocks, ctx->fs_badblocks_count); + (int) ((long long) 100 * blocks_used / blocks), + ctx->fs_badblocks_count); printf (_("\n%8d regular files\n" "%8d directories\n" "%8d character device files\n" -- 1.8.3.1