summaryrefslogtreecommitdiff
path: root/sys/arch/i386
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2003-10-05 02:26:04 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2003-10-05 02:26:04 +0000
commit20c64bb39469fc5547c7b1d3613c40d9d4dcfd3a (patch)
tree855879432d69a9ecda302e02a0047ed8f33e2b58 /sys/arch/i386
parentf755b1cdf567719b055fa403d3671d835bbb44de (diff)
do not panic if microtime does not work to measure rng performance; from andrisp@hipo.lv
Diffstat (limited to 'sys/arch/i386')
-rw-r--r--sys/arch/i386/pci/pchb.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/arch/i386/pci/pchb.c b/sys/arch/i386/pci/pchb.c
index 8e3278aceab..5766ba9c5fe 100644
--- a/sys/arch/i386/pci/pchb.c
+++ b/sys/arch/i386/pci/pchb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pchb.c,v 1.39 2003/06/03 20:10:32 mickey Exp $ */
+/* $OpenBSD: pchb.c,v 1.40 2003/10/05 02:26:03 mickey Exp $ */
/* $NetBSD: pchb.c,v 1.6 1997/06/06 23:29:16 thorpej Exp $ */
/*
@@ -357,8 +357,10 @@ pchbattach(parent, self, aux)
timersub(&tv2, &tv1, &tv1);
if (tv1.tv_sec)
tv1.tv_usec += 1000000 * tv1.tv_sec;
- printf(": rng active, %dKb/sec",
- 8 * 1000000 / tv1.tv_usec);
+ printf(": rng active");
+ if (tv1.tv_usec != 0)
+ printf(", %dKb/sec",
+ 8 * 1000000 / tv1.tv_usec);
timeout_set(&sc->sc_tmo, pchb_rnd, sc);
sc->i = 4;