NetBSD Problem Report #18822
Received: (qmail 26806 invoked by uid 605); 27 Oct 2002 03:07:16 -0000
Message-Id: <200210270306.g9R36wc15509@fsrv.plectere.com>
Date: Sat, 26 Oct 2002 20:06:58 -0700 (PDT)
From: Paul Shupak <paul@fsrv.plectere.com>
Sender: gnats-bugs-owner@netbsd.org
Reply-To: paul@fsrv.plectere.com
To: gnats-bugs@gnats.netbsd.org
Subject: Formatting problem with "systat io/numbers"
X-Send-Pr-Version: 3.95
>Number: 18822
>Category: bin
>Synopsis: a single space is wasted causing constant textual misaligments
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bin-bug-people
>State: closed
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Sun Oct 27 03:08:00 +0000 2002
>Closed-Date: Sun Dec 29 19:07:09 +0000 2002
>Last-Modified: Sun Dec 29 19:07:09 +0000 2002
>Originator: Paul Shupak
>Release: NetBSD 1.6J - today
>Organization:
>Environment:
System: NetBSD fsrv 1.6J NetBSD 1.6J (FSRV) #264: Sat Oct 26 17:03:28 PDT 2002 root@fsrv:/usr/src/sys/arch/i386/compile/FSRV i386
Architecture: i386
Machine: i386
>Description:
Use any disk/process combo over 1M/s and the "kBps" field overflows
its allowed three spaces. NOTE: The other space for the higher order column
ALREADY exists and is just wasted now.
>How-To-Repeat:
% systat io
:number
>Fix:
iostat.c-diffs: Permission denied.
Index: iostat.c
===================================================================
RCS file: /cvsroot/basesrc/usr.bin/systat/iostat.c,v
retrieving revision 1.22
diff -c -r1.22 iostat.c
*** iostat.c 2002/09/25 13:50:39 1.22
--- iostat.c 2002/10/27 02:56:05
***************
*** 240,246 ****
words = cur.dk_bytes[dn] / 1024.0; /* # of k transferred */
if (numbers) {
! mvwprintw(wnd, row, col, " %3.0f%4.0f%5.1f",
words / etime, cur.dk_xfer[dn] / etime, atime / etime);
return (row);
}
--- 240,246 ----
words = cur.dk_bytes[dn] / 1024.0; /* # of k transferred */
if (numbers) {
! mvwprintw(wnd, row, col, "%4.0f%4.0f%5.1f",
words / etime, cur.dk_xfer[dn] / etime, atime / etime);
return (row);
}
>Release-Note:
>Audit-Trail:
From: Krister Walfridsson <kristerw@netbsd.org>
To: gnats-bugs@gnats.netbsd.org
Cc:
Subject: pr/18822 CVS commit: src/usr.bin/systat
Date: Sun, 29 Dec 2002 21:03:58 +0200 (EET)
Module Name: src
Committed By: kristerw
Date: Sun Dec 29 19:03:57 UTC 2002
Modified Files:
src/usr.bin/systat: iostat.c
Log Message:
Prevent the "kBps" field from overflowing for values > 1M/s.
From Paul Shupak in PR 18822.
To generate a diff of this commit:
cvs rdiff -r1.24 -r1.25 src/usr.bin/systat/iostat.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: kristerw
State-Changed-When: Sun Dec 29 11:05:37 PST 2002
State-Changed-Why:
The patch has been applied to the current source. Thank you for the PR!
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.