Date: Tue, 9 Dec 2003 20:58:02 +1100 (EST) From: Bruce Evans <bde@zeta.org.au> To: Dag-Erling =?iso-8859-1?q?Sm=F8rgrav?= <des@des.no> Cc: src-committers@FreeBSD.org Subject: Re: cvs commit: src/usr.bin/vmstat vmstat.c Message-ID: <20031209205728.A4462@gamplex.bde.org> In-Reply-To: <20031209011521.J6926@gamplex.bde.org> References: <200312080757.hB87vvTA048651@repoman.freebsd.org> <20031208225505.H6229@gamplex.bde.org> <xzpy8tn5wqs.fsf@dwp.des.no> <20031208235157.U6502@gamplex.bde.org> <20031209011521.J6926@gamplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
[Resending after bounce] On Mon, 8 Dec 2003, Dag-Erling [iso-8859-1] Sm=F8rgrav wrote: > Bruce Evans <bde@zeta.org.au> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031209205728.A4462>