From owner-freebsd-bugs Wed May 9 9: 4:58 2001 Delivered-To: freebsd-bugs@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id 60D2D37B423; Wed, 9 May 2001 09:04:55 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id CAA23413; Thu, 10 May 2001 02:04:49 +1000 Date: Thu, 10 May 2001 02:03:19 +1000 (EST) From: Bruce Evans X-Sender: bde@besplex.bde.org To: Dag-Erling Smorgrav Cc: dwmalone@FreeBSD.ORG, freebsd-bugs@FreeBSD.ORG Subject: Re: kern/27215: when cat'ing /compat/linux/proc/stat, we have negative numbers In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On 9 May 2001, Dag-Erling Smorgrav wrote: > Bruce Evans writes: > > Mainly the "interface" given by the type of cp_time. systat and vmstat, > > etc., depend on it being an array of longs. systat uses a sysctl to > > read the array, but this doesn't help much because it assumes that the > > array elements have the same types as in the kernel. > > How about hacking systat to check the size of the returned data, and > use longs if it's only 20 bytes instead of 40? That'll allow the new > systat to run on old kernels, though it won't help an old userland > running on a new kernel - but heck, this is -CURRENT. The problem is more with ports. I guess ports need this and systat is a good place to prototype it. It's also another incentive to convert vmstat to use the sysctl. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message