Whamcloud - gitweb
ChangeLog, Makefile.in:
authorTheodore Ts'o <tytso@mit.edu>
Wed, 5 Jul 2000 23:54:46 +0000 (23:54 +0000)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 5 Jul 2000 23:54:46 +0000 (23:54 +0000)
  Makefile.in (install): Install resize2fs in /sbin, not /usr/sbin.
ChangeLog, unix.c:
  unix.c: Also, re-arrange the logic so that we do the time check only
   after doing the percentage check, and we only advance the spinner if
   we're about to display it.
ChangeLog:
  Fix minor wording error in Chagelog.

ChangeLog
e2fsck/ChangeLog
e2fsck/unix.c
resize/ChangeLog
resize/Makefile.in

index b3d2a57..cfba3da 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -31,7 +31,7 @@
 Thu Apr  6 17:43:11 2000  Theodore Y. Ts'o  <tytso@signal.thunk.org>
 
        * configure.in (fdatasync): Add test for fdatasync(), since not
-               all functions have this function.
+               all OS's have this function.
 
 2000-04-03  Theodore Ts'o  <tytso@valinux.com>
 
index 3aa67c2..abaa9bc 100644 (file)
@@ -4,6 +4,9 @@
                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).
+               Also, re-arrange the logic so that we do the time
+               check only after doing the percentage check, and we
+               only advance the spinner if we're about to display it.
 
 2000-07-04  Theodore Ts'o  <tytso@valinux.com>
 
index 3b43f7d..1675817 100644 (file)
@@ -340,18 +340,35 @@ static int e2fsck_update_progress(e2fsck_t ctx, int pass,
        } else {
                if (ctx->flags & E2F_FLAG_PROG_SUPPRESS)
                        return 0;
+               /*
+                * Calculate the new progress position.  If the
+                * percentage hasn't changed, then we skip out right
+                * away. 
+                */
+               percent = calc_percent(&e2fsck_tbl, pass, cur, max);
+               if (ctx->progress_last_percent == (int) 10 * percent)
+                       return 0;
+               ctx->progress_last_percent = (int) 10 * percent;
+
+               /*
+                * If we've already updated the spinner once within
+                * the last 1/8th of a second, no point doing it
+                * again.
+                */
                gettimeofday(&tv, NULL);
                tick = (tv.tv_sec << 3) + (tv.tv_usec / (1000000 / 8));
                if ((tick == ctx->progress_last_time) &&
                    (cur != max) && (cur != 0))
                        return 0;
                ctx->progress_last_time = tick;
+
+               /*
+                * Advance the spinner, and note that the progress bar
+                * will be on the screen
+                */
                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) 10 * percent)
-                       return 0;
-               ctx->progress_last_percent = (int) 10 * percent;
+               
                i = ((percent * dpywidth) + 50) / 100;
                printf("%s: |%s%s", ctx->device_name,
                       bar + (sizeof(bar) - (i+1)),
index 536e721..6fff5db 100644 (file)
@@ -1,3 +1,7 @@
+2000-07-05    <tytso@snap.thunk.org>
+
+       * Makefile.in (install): Install resize2fs in /sbin, not /usr/sbin.
+
 2000-06-12  Theodore Ts'o  <tytso@valinux.com>
 
        * main.c, resize2fs.c, resize2fs.h, extent.c: Add NLS support.
index aa3a7b8..c833c4f 100644 (file)
@@ -50,13 +50,13 @@ test_extent: $(TEST_EXTENT_OBJS)
        $(CC) $(ALL_LDFLAGS) -o test_extent $(TEST_EXTENT_OBJS) $(LIBS)
        
 installdirs:
-       $(top_srcdir)/mkinstalldirs $(DESTDIR)$(sbindir) \
+       $(top_srcdir)/mkinstalldirs $(DESTDIR)$(root_sbindir) \
                $(DESTDIR)$(man8dir)
 
 install: $(PROGS) $(MANPAGES) installdirs
        for i in $(PROGS); do \
-               $(INSTALL_PROGRAM) $$i $(DESTDIR)$(sbindir)/$$i; \
-               $(STRIP) $(DESTDIR)$(sbindir)/$$i; \
+               $(INSTALL_PROGRAM) $$i $(DESTDIR)$(root_sbindir)/$$i; \
+               $(STRIP) $(DESTDIR)$(root_sbindir)/$$i; \
        done
        for i in $(MANPAGES); do \
                $(INSTALL_DATA) $$i $(DESTDIR)$(man8dir)/$$i; \
@@ -64,7 +64,7 @@ install: $(PROGS) $(MANPAGES) installdirs
 
 uninstall:
        for i in $(PROGS); do \
-               $(RM) -f $(DESTDIR)$(sbindir)/$$i; \
+               $(RM) -f $(DESTDIR)$(root_sbindir)/$$i; \
        done
        for i in $(MANPAGES); do \
                $(RM) -f $(DESTDIR)$(man8dir)/$$i; \