From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KDsA7-0002mQ-EE for mharc-grub-devel@gnu.org; Tue, 01 Jul 2008 22:33:39 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KDsA6-0002le-6u for grub-devel@gnu.org; Tue, 01 Jul 2008 22:33:38 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KDsA4-0002kW-Nd for grub-devel@gnu.org; Tue, 01 Jul 2008 22:33:37 -0400 Received: from [199.232.76.173] (port=43377 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KDsA4-0002kH-Hk for grub-devel@gnu.org; Tue, 01 Jul 2008 22:33:36 -0400 Received: from nf-out-0910.google.com ([64.233.182.187]:63050) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KDsA4-0008FQ-6R for grub-devel@gnu.org; Tue, 01 Jul 2008 22:33:36 -0400 Received: by nf-out-0910.google.com with SMTP id c7so43887nfi.26 for ; Tue, 01 Jul 2008 19:33:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:in-reply-to :references:content-type:date:message-id:mime-version:x-mailer; bh=hgzFqqsdrqdbOeogTDfFluRfHClwGJwC5AAfcHc35MQ=; b=AGlPfv2GDCwfYL90pqRuyfWvUGF5OgnWMiKNLAuq6KUwBM+tdVsmq11XdZZL+sJApI 4WLcs+eRedw0+yrPvQpM+fvIfcWqmAPQEkfrs60oyVArwxpy5U6Gqnn1hr2JeYQBOS8/ PFcNtz11gK0ZmuDFwmw7dP2gYJaWmjXk9Uzno= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:in-reply-to:references:content-type:date:message-id :mime-version:x-mailer; b=cDQZe3XVRjdmiEm1u3th42sgnQ2D8jBJTpbxV7LY9wig5GCNGvXQToGvQK9jnB7PV2 gMhTJQizGTBZNPdwGxfZKdRdhAstK1wI3HlT+HrWwtsdwdgOhNTKBq2PI7ZatVl+IS2J xZkkOjcbcT9dQlCeIBRfCI0oeGkKNZNvhrw9U= Received: by 10.210.36.10 with SMTP id j10mr6004064ebj.164.1214966015023; Tue, 01 Jul 2008 19:33:35 -0700 (PDT) Received: from ?192.168.1.100? ( [213.37.137.93]) by mx.google.com with ESMTPS id z34sm9549212ikz.9.2008.07.01.19.33.33 (version=SSLv3 cipher=RC4-MD5); Tue, 01 Jul 2008 19:33:34 -0700 (PDT) From: Javier =?ISO-8859-1?Q?Mart=EDn?= To: The development of GRUB 2 In-Reply-To: <1214964880.7362.17.camel@dv> References: <1214964880.7362.17.camel@dv> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-aoOi2BBvq7smKlnVQ97g" Date: Wed, 02 Jul 2008 04:33:47 +0200 Message-Id: <1214966028.9353.95.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.22.2 X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) Subject: Re: Eliminating grub_size_t X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jul 2008 02:33:38 -0000 --=-aoOi2BBvq7smKlnVQ97g Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable El mar, 01-07-2008 a las 22:14 -0400, Pavel Roskin escribi=C3=B3: > Hello! >=20 > I wonder if we would be better off without grub_size_t. I cannot think > of any code that could use it legitimately. >=20 > The ordinary size_t is used to represent the result of sizeof, i.e. size > of a structure. There is no need for grub to support data structures > exceeding 4 gigabytes. If we want to support more memory, that's fine, > but that would involve other types that can hold the pointer values, > such as long. I'm not sure if I'm getting you right. Are you suggesting that we "undo" the someinteger->size_t conversion that caused so many headaches in many 32->64 bit ports? Machine-dependant types like size_t and ptrdiff_t are here to help us, not to haunt us. What is the exact problem with size_t in GRUB right now? I agree that grub_size_t is redundant, though. >=20 > size_t has different size on 32-bit and 64-bit systems, but we should > strive to make the userspace utilities work like the bootloader, so that > possible problems can be detected early and debugged easily. I didn't understand this. What do you mean with "US working like the bootloader?" >=20 > Besides, we cannot even print size_t in grub_printf(), and I don't think > we should. 1. that can be worked out 2. why not? >=20 > grub_size_t should be replaced with int or grub_uint32_t. size_t can be > used in pure userspace code to call functions that need it. >=20 --=-aoOi2BBvq7smKlnVQ97g Content-Type: application/pgp-signature; name=signature.asc Content-Description: Esta parte del mensaje =?ISO-8859-1?Q?est=E1?= firmada digitalmente -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iQIVAwUASGrpC6Sl+Fbdeo72AQK99RAAx2cfowXZkuBODRoODSCf14ALGXhwP47Q iUNFe/drv0K30jlQh6lLAyoxA7YiqCCR/rLn/8qVw7lSiMpgZ7bSZtkbZ/8H1IpM mp63lNS825aQ45SO3EKrLucTfWDeVOsZATsygpfO3uYqCgG6IXq72iKYJjPuZ88s bHVVhzhfnwZ5IUN1afPLWM/7TaculY/9UTpXm15sfv5ANSQrQCBGcUxijEG2oCak NjtnCleAi9Wiyhpfcefk9JoHQOaXMLcvdokiNs4XhuPsGx6rhQemMxQpWl4A9q5S 307PYui0rjnuR1XKxf+36bFqfo1pfyxfaypGY8412D7SW539mXbul3XIfNOXANvX gSogLk1nrTzRubhBAD8rsL87WmfvU3V3ivX/EJU+De6AKPsfhVIt0K8baRpNZSKA 5nY5CiyICsiwC1qVgbY2Jpp8X6RNESbdDtX8BCWF8MMXV4S/PJ0G8q5cYwcQcrL4 NyZr2tLN9GB1r4dT7dc6IvF/TOmTGA5os8ErM0ragDAPAD9M2gxPDF7yiuTv6Wuv nxpPYiFYQbYwnmcE3/dHPOrhRpbCRzCGT1VOl1K3o13yaLcqL/sGBrY5V+hqmMjH k2wB6QTNU079E++S3uxdsf2PdyvVROg4UxaxQkYZq+9vGgzO4VtTjyrsoE1aIKGX 9F945UazaVE= =7FdB -----END PGP SIGNATURE----- --=-aoOi2BBvq7smKlnVQ97g--