From owner-cvs-all Tue Feb 20 15: 9:51 2001 Delivered-To: cvs-all@freebsd.org Received: from www.evil.2y.net (ip-216-23-53-155.adsl.one.net [216.23.53.155]) by hub.freebsd.org (Postfix) with ESMTP id 54B6A37B4EC; Tue, 20 Feb 2001 15:09:41 -0800 (PST) (envelope-from cokane@www.evil.2y.net) Received: (from cokane@localhost) by www.evil.2y.net (8.11.2/8.11.1) id f1KNNR795406; Tue, 20 Feb 2001 18:23:27 -0500 (EST) (envelope-from cokane) Date: Tue, 20 Feb 2001 18:23:27 -0500 From: Coleman Kane To: John Baldwin Cc: Bruce Evans , Poul-Henning Kamp , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org, "Pierre Y. Dampure" Subject: Re: cvs commit: src/sys/sys user.h Message-ID: <20010220182326.A95303@cokane.yi.org> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="ibTvN161/egqYuK8" X-Mailer: Mutt 1.0.1i In-Reply-To: ; from jhb@FreeBSD.org on Tue, Feb 20, 2001 at 05:48:34AM -0500 X-Vim: vim:tw=70:ts=4:sw=4 Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG --ibTvN161/egqYuK8 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Yeah, as soon as I realized wht was going on (and giving me the warning), I= =20 realized how problemeatic this structure is. I also took a look at the comm= it, and saw the addition was in the top of it. Well, since this is -CURRENT, we= are supposed to expect breakages like this. Basically, I think a nice temporary= =20 solution would be to define all the elements in the structs to datatypes th= at have static datasizes where we can. Rather than simply int, use u_int32 or whatever is necessary. Of course, it would be optimal to actually have a=20 way to get this info without causing a program to break. Anyway, the commit= =20 seemed to be for an extra variable that probably should be at the top of the kinfo_struct. In the future, it would be advantageous to add variables that describe new info about the process at the end, above the empty space. There has to be a nicer way to implement this, though. John Baldwin had the audacity to say: > On 20-Feb-01 Bruce Evans wrote: > > On Mon, 19 Feb 2001, John Baldwin wrote: > >=20 > >> about if needed. The current kinfo_proc is now actually worse than be= fore, > >> because if something changes in teh middle, then all the programs such= as > >> ps(1), top(1) etc. just misparse the information instead of telling yo= u that > >> proc chagned as they did in the past. Of course, a better way of doin= g this > >=20 > > Things in the middle must not change. They must be initialized with wh= atever > > the used to be, or with dummy values if that is harmless. There would = have > > been no problems if this rule were followed for the priority fields. s= truct > > priority can't be used in struct rusage anyway, since it is a kernel st= ruct. >=20 > Well, it gets more tricky. I've been playing with bumping MAXCOMLEN to 1= 9 (so > it uses a total of 20 rather than 17 chars, which is 32-bit aligned) which > results in expanding teh size of a structure in the middle of kinfo_proc,= which > the current kinfo_proc scheme cannot handle. >=20 > > Bruce >=20 > --=20 >=20 > John Baldwin -- http://www.FreeBSD.org/~jhb/ > PGP Key: http://www.baldwin.cx/~john/pgpkey.asc > "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ >=20 --ibTvN161/egqYuK8 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.4 (FreeBSD) Comment: For info see http://www.gnupg.org iD8DBQE6kvxuERViMObJ880RARlHAKDF2NMJ16KPsjlVUKOlCiVYC1lAugCeNw++ 7VLIDjDQ8kOnVRqFr4jR79o= =aX9S -----END PGP SIGNATURE----- --ibTvN161/egqYuK8-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message