svn commit: r225802 - user/des/phybs
Dag-Erling Smorgrav
des at FreeBSD.org
Tue Sep 27 16:57:14 UTC 2011
Author: des
Date: Tue Sep 27 16:57:14 2011
New Revision: 225802
URL: http://svn.freebsd.org/changeset/base/225802
Log:
Lengthen the progress bar to cover the entire width of the numbers which
will replace it, change the indicator character from '|' to 'O', and
increase the update frequency.
Modified:
user/des/phybs/phybs.c
Modified: user/des/phybs/phybs.c
==============================================================================
--- user/des/phybs/phybs.c Tue Sep 27 16:33:17 2011 (r225801)
+++ user/des/phybs/phybs.c Tue Sep 27 16:57:14 2011 (r225802)
@@ -56,8 +56,8 @@ static int opt_s;
static int opt_w;
static int tty = 0;
-static char progress[] = " [----------------]"
- "\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b";
+static char progress[] = " [-----------------------]"
+ "\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b";
static void
scan(int fd, size_t size, off_t offset, off_t step, unsigned int count)
@@ -94,10 +94,10 @@ scan(int fd, size_t size, off_t offset,
errx(EX_IOERR, "short write: %ld < %lu",
(long)wlen, (unsigned long)size);
}
- if (tty && i % 256 == 0) {
- progress[2 + (i * 16) / count] = '|';
+ if (tty && i % 16 == 0) {
+ progress[2 + (i * 23) / count] = 'O';
fputs(progress, stdout);
- progress[2 + (i * 16) / count] = '-';
+ progress[2 + (i * 23) / count] = '-';
fflush(stdout);
}
}
More information about the svn-src-user
mailing list