Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Feb 2020 20:57:32 +0000 (UTC)
From:      Edward Tomasz Napierala <trasz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r358228 - head/usr.sbin/iostat
Message-ID:  <202002212057.01LKvWnx066616@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: trasz
Date: Fri Feb 21 20:57:32 2020
New Revision: 358228
URL: https://svnweb.freebsd.org/changeset/base/358228

Log:
  Fix formatting for tps values between 99.95 and 99.99; previously
  it would display as "100.0", breaking vertical alignment.
  
  MFC after:	2 weeks
  Differential Revision:	https://reviews.freebsd.org/D23538

Modified:
  head/usr.sbin/iostat/iostat.c

Modified: head/usr.sbin/iostat/iostat.c
==============================================================================
--- head/usr.sbin/iostat/iostat.c	Fri Feb 21 18:21:57 2020	(r358227)
+++ head/usr.sbin/iostat/iostat.c	Fri Feb 21 20:57:32 2020	(r358228)
@@ -929,7 +929,7 @@ devstats(int perf_select, long double etime, int havel
 			}
 			free(devicename);
 		} else if (oflag > 0) {
-			int msdig = (ms_per_transaction < 100.0) ? 1 : 0;
+			int msdig = (ms_per_transaction < 99.94) ? 1 : 0;
 
 			if (Iflag == 0)
 				printf("%4.0Lf%4.0Lf%5.*Lf ",



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202002212057.01LKvWnx066616>