Whamcloud - gitweb
ChangeLog, unix.c:
authorTheodore Ts'o <tytso@mit.edu>
Wed, 5 Jul 2000 18:25:59 +0000 (18:25 +0000)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 5 Jul 2000 18:25:59 +0000 (18:25 +0000)
  unix.c (e2fsck_update_progress): Only save and check the last
   percentage after multiplying it by 10, nor 1000, since we only need to
   save values to a tenth of a percent (and the percentage is already
   from 0 .. 100%, not 0 .. 1).

e2fsck/ChangeLog
e2fsck/unix.c

index 4bce316..3aa67c2 100644 (file)
@@ -1,3 +1,10 @@
+2000-07-05  Theodore Ts'o  <tytso@valinux.com>
+
+       * unix.c (e2fsck_update_progress): Only save and check the last
+               percentage after multiplying it by 10, nor 1000, since we
+               only need to save values to a tenth of a percent (and the
+               percentage is already from 0 .. 100%, not 0 .. 1).
+
 2000-07-04  Theodore Ts'o  <tytso@valinux.com>
 
        * pass1.c (e2fsck_pass1): Check to see if the ext3 s_last_orphan
index 9f5d7f0..3b43f7d 100644 (file)
@@ -349,9 +349,9 @@ static int e2fsck_update_progress(e2fsck_t ctx, int pass,
                ctx->progress_pos = (ctx->progress_pos+1) & 3;
                ctx->flags |= E2F_FLAG_PROG_BAR;
                percent = calc_percent(&e2fsck_tbl, pass, cur, max);
-               if (ctx->progress_last_percent == (int) 1000 * percent)
+               if (ctx->progress_last_percent == (int) 10 * percent)
                        return 0;
-               ctx->progress_last_percent = (int) 1000 * percent;
+               ctx->progress_last_percent = (int) 10 * percent;
                i = ((percent * dpywidth) + 50) / 100;
                printf("%s: |%s%s", ctx->device_name,
                       bar + (sizeof(bar) - (i+1)),