From owner-cvs-all@FreeBSD.ORG Tue Dec 9 01:58:13 2003 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C3D7D16A4CE; Tue, 9 Dec 2003 01:58:13 -0800 (PST) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id B164D43D21; Tue, 9 Dec 2003 01:58:11 -0800 (PST) (envelope-from bde@zeta.org.au) Received: from gamplex.bde.org (katana.zip.com.au [61.8.7.246]) by mailman.zeta.org.au (8.9.3p2/8.8.7) with ESMTP id UAA05501; Tue, 9 Dec 2003 20:58:03 +1100 Date: Tue, 9 Dec 2003 20:58:02 +1100 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Dag-Erling =?iso-8859-1?q?Sm=F8rgrav?= In-Reply-To: <20031209011521.J6926@gamplex.bde.org> Message-ID: <20031209205728.A4462@gamplex.bde.org> References: <200312080757.hB87vvTA048651@repoman.freebsd.org> <20031208225505.H6229@gamplex.bde.org> <20031208235157.U6502@gamplex.bde.org> <20031209011521.J6926@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN Content-Transfer-Encoding: QUOTED-PRINTABLE cc: cvs-src@FreeBSD.org cc: Marcel Moolenaar cc: cvs-all@FreeBSD.org cc: src-committers@FreeBSD.org Subject: Re: cvs commit: src/usr.bin/vmstat vmstat.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Dec 2003 09:58:13 -0000 [Resending after bounce] On Mon, 8 Dec 2003, Dag-Erling [iso-8859-1] Sm=F8rgrav wrote: > Bruce Evans writes: > > =09for (i =3D 0; i < nintr; i++) { > > =09=09clen =3D strlen(tintrname); > > + > > +=09=09/* Work around bogus padding in new interrupt code. */ > > +=09=09while (clen > 0 && tintrname[clen - 1] =3D=3D ' ') > > +=09=09=09clen--; > > + > > =09=09if (clen > istrnamlen) > > =09=09=09istrnamlen =3D clen; > > =09=09tintrname +=3D clen + 1; > > =09} > > This is wrong. You can't possibly have tested it. Oops. I tested it on several i386 kernels and it seemed to work. It may have worked accidentally because the longest string was near the beginning. I even avoided that bug in a related fix written previously for systat. Anyway, this is just a reminder to fix the kernel. Bruce