summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sysinstall/package.c
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1997-09-16 10:14:23 +0000
committerjkh <jkh@FreeBSD.org>1997-09-16 10:14:23 +0000
commitd387f3a0a99b84c361775c58a44002ed3511c815 (patch)
tree0a3cae00e9faa8ad5df5d833845a3dbf728e63b4 /usr.sbin/sysinstall/package.c
parent1bd32b987b7336e1c1c99ba6a70f36b84af119ed (diff)
downloadFreeBSD-src-d387f3a0a99b84c361775c58a44002ed3511c815.zip
FreeBSD-src-d387f3a0a99b84c361775c58a44002ed3511c815.tar.gz
MF22: pst's changes.
Submitted by: pst
Diffstat (limited to 'usr.sbin/sysinstall/package.c')
-rw-r--r--usr.sbin/sysinstall/package.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.sbin/sysinstall/package.c b/usr.sbin/sysinstall/package.c
index ba56291..25cd40b 100644
--- a/usr.sbin/sysinstall/package.c
+++ b/usr.sbin/sysinstall/package.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: package.c,v 1.61 1997/03/22 15:20:51 jkh Exp $
+ * $Id: package.c,v 1.62 1997/06/13 17:55:32 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -96,7 +96,7 @@ int
package_extract(Device *dev, char *name, Boolean depended)
{
char path[511];
- int ret;
+ int ret, last_msg = 0;
FILE *fp;
/* Check to make sure it's not already there */
@@ -165,7 +165,10 @@ package_extract(Device *dev, char *name, Boolean depended)
seconds = stop.tv_sec + (stop.tv_usec / 1000000.0);
if (!seconds)
seconds = 1;
- msgInfo("%10d bytes read from package %s @ %4.1f KBytes/second", tot, name, (tot / seconds) / 1024.0);
+ if (seconds != last_msg) {
+ last_msg = seconds;
+ msgInfo("%10d bytes read from package %s @ %4.1f KBytes/second", tot, name, (tot / seconds) / 1024.0);
+ }
/* Write it out */
if (sigpipe_caught || write(pfd[1], buf, i) != i) {
msgInfo("Write failure to pkg_add! Package may be corrupt.");
OpenPOWER on IntegriCloud