From owner-freebsd-current@FreeBSD.ORG Fri Jan 7 00:51:40 2005 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BF58E16A4CE; Fri, 7 Jan 2005 00:51:40 +0000 (GMT) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 94E5143D31; Fri, 7 Jan 2005 00:51:40 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.13.0/8.13.0) with ESMTP id j070rTXj015835; Thu, 6 Jan 2005 16:53:29 -0800 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id j070rTaW015834; Thu, 6 Jan 2005 16:53:29 -0800 Date: Thu, 6 Jan 2005 16:53:29 -0800 From: Brooks Davis To: Pawel Jakub Dawidek Message-ID: <20050107005329.GA14976@odin.ac.hmc.edu> References: <20050106191201.GA30826@gothmog.gr> <20050106195719.GB24896@odin.ac.hmc.edu> <20050106225857.GB784@darkness.comp.waw.pl> <20050107003655.GC784@darkness.comp.waw.pl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="NzB8fVQJ5HfG6fxh" Content-Disposition: inline In-Reply-To: <20050107003655.GC784@darkness.comp.waw.pl> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Spam-Status: No, hits=0.0 required=8.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on odin.ac.hmc.edu cc: freebsd-current@FreeBSD.org cc: Giorgos Keramidas Subject: Re: human-readable swap partition sizes with pstat -sh X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Jan 2005 00:51:40 -0000 --NzB8fVQJ5HfG6fxh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jan 07, 2005 at 01:36:55AM +0100, Pawel Jakub Dawidek wrote: > On Thu, Jan 06, 2005 at 11:58:57PM +0100, Pawel Jakub Dawidek wrote: > +> On Thu, Jan 06, 2005 at 11:57:19AM -0800, Brooks Davis wrote: > +> +> I'd argue that we might want to replace the int64_t in humanize_num= ber > +> +> with intmax_t since that wouldn't change the ABI (or API due to imp= licit > +> +> casts), but would mean we wouldn't have to add a humanize_number128 > +> +> later if some architecture grows 128-bit ints for some reason or > +> +> another. > +>=20 > +> I like intmax_t also much better than int64_t, but I took it from NetB= SD > +> and they got int64_t there. Anyway, I think we don't have to be 100% > +> compatible here and I'll look what can be done. >=20 > Here is proposed patch: >=20 > http://people.freebsd.org/~pjd/patches/humanize_number.patch >=20 > There is one issue... I had to add '#include ' to libutil.h. That's kind of annoying. I'm not sure if breaking the API or adding header polution to libutil.h is better. All all the casts of off_t's to intmax_t's really necessicary? off_t is signed so the implicit cast should always be safe, espeicaly if we switch to intmax_t (since we're then given an absolute assurance that we can't overflow). -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --NzB8fVQJ5HfG6fxh Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFB3d2IXY6L6fI4GtQRApx3AKDluyHd3bqiNvcFDnVjzovUV3h6vwCcDhnW 8gECMRP4h70X4/tnbm/Z9zA= =NbPc -----END PGP SIGNATURE----- --NzB8fVQJ5HfG6fxh--