From: millert Date: Sat, 14 Aug 2021 14:22:26 +0000 (+0000) Subject: Fix iostat per-device values when in boot time mode ('b'). X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=6a11d289934cf3f93366066bae5e2d182b490e9c;p=openbsd Fix iostat per-device values when in boot time mode ('b'). The values should be displayed as-is and not normalized based on the sleep interval. From Anindya Mukherjee --- diff --git a/usr.bin/systat/iostat.c b/usr.bin/systat/iostat.c index 4d200294690..bdb316e7072 100644 --- a/usr.bin/systat/iostat.c +++ b/usr.bin/systat/iostat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: iostat.c,v 1.49 2019/06/28 13:35:04 deraadt Exp $ */ +/* $OpenBSD: iostat.c,v 1.50 2021/08/14 14:22:26 millert Exp $ */ /* $NetBSD: iostat.c,v 1.5 1996/05/10 23:16:35 thorpej Exp $ */ /* @@ -167,9 +167,12 @@ void print_io(void) { int n, count = 0; - int curr; - etime = naptime; + + if (state == BOOT) + etime = 1.0; + else + etime = naptime; /* XXX engine internals: save and restore curr_line for bcache */ curr = curr_line;