From owner-svn-src-projects@FreeBSD.ORG Wed Jun 24 19:20:46 2009 Return-Path: Delivered-To: svn-src-projects@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 624511065673; Wed, 24 Jun 2009 19:20:46 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail02.syd.optusnet.com.au (mail02.syd.optusnet.com.au [211.29.132.183]) by mx1.freebsd.org (Postfix) with ESMTP id D752A8FC27; Wed, 24 Jun 2009 19:20:45 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c122-107-126-113.carlnfd1.nsw.optusnet.com.au (c122-107-126-113.carlnfd1.nsw.optusnet.com.au [122.107.126.113]) by mail02.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id n5OJKg7K024172 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 25 Jun 2009 05:20:43 +1000 Date: Thu, 25 Jun 2009 05:20:42 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: John Baldwin In-Reply-To: <200906241122.08934.jhb@freebsd.org> Message-ID: <20090625050902.S33465@delplex.bde.org> References: <200906241500.n5OF0jTG017766@svn.freebsd.org> <200906241122.08934.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-projects@FreeBSD.org, Ulf Lilleengen , src-committers@FreeBSD.org Subject: Re: svn commit: r194838 - projects/libprocstat/sys/sys X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jun 2009 19:20:46 -0000 On Wed, 24 Jun 2009, John Baldwin wrote: > On Wednesday 24 June 2009 11:00:45 am Ulf Lilleengen wrote: >> >> Log: >> - Use the spare fields instead of expanding the struct. >> - Use types with known size. > > Note that mode_t and dev_t have fixed sizes already and are fine to use, same > with off_t for the file size. > >> From : > > typedef __uint16_t __mode_t; /* permissions */ > typedef __int64_t __off_t; /* file offset */ > typedef __uint32_t __dev_t; /* device number */ I don't agree with using fixed-width types, but it would be difficult to map opaque types and their padding into the int spares. Only fields of type int can be mapped properly. struct kinfo_proc also has long and pointer spares so that more fields can be mapped properly. Bruce