Skip site navigation (1)Skip section navigation (2)
Date:      09 May 2001 16:50:55 +0200
From:      Dag-Erling Smorgrav <des@ofug.org>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        dwmalone@FreeBSD.ORG, freebsd-bugs@FreeBSD.ORG
Subject:   Re: kern/27215: when cat'ing /compat/linux/proc/stat, we have negative numbers
Message-ID:  <xzpr8xyh8z4.fsf@flood.ping.uio.no>
In-Reply-To: <Pine.BSF.4.21.0105100033380.18886-100000@besplex.bde.org>
References:  <Pine.BSF.4.21.0105100033380.18886-100000@besplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Bruce Evans <bde@zeta.org.au> 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.

DES
-- 
Dag-Erling Smorgrav - des@ofug.org

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




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