From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KET0B-0001Cn-Qj for mharc-grub-devel@gnu.org; Thu, 03 Jul 2008 13:53:51 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KET0A-0001BY-CC for grub-devel@gnu.org; Thu, 03 Jul 2008 13:53:50 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KET08-0001Ae-TC for grub-devel@gnu.org; Thu, 03 Jul 2008 13:53:50 -0400 Received: from [199.232.76.173] (port=39947 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KET08-0001AS-PH for grub-devel@gnu.org; Thu, 03 Jul 2008 13:53:48 -0400 Received: from smtp-vbr12.xs4all.nl ([194.109.24.32]:3369) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KET08-0006Re-Cn for grub-devel@gnu.org; Thu, 03 Jul 2008 13:53:48 -0400 Received: from localhost.localdomain (249-174.surfsnel.dsl.internl.net [145.99.174.249]) by smtp-vbr12.xs4all.nl (8.13.8/8.13.8) with ESMTP id m63HrilV008933 for ; Thu, 3 Jul 2008 19:53:44 +0200 (CEST) (envelope-from mgerards@xs4all.nl) From: Marco Gerards To: The development of GRUB 2 References: <1214964880.7362.17.camel@dv> <1214966028.9353.95.camel@localhost> <20080702002031.7gkuoel14wg80c0k-cebfxv@webmail.spamcop.net> <486BBEF1.6000105@nic.fi> <1215021108.29069.4.camel@dv> Mail-Copies-To: mgerards@xs4all.nl Date: Thu, 03 Jul 2008 20:02:05 +0200 In-Reply-To: <1215021108.29069.4.camel@dv> (Pavel Roskin's message of "Wed, 02 Jul 2008 13:51:48 -0400") Message-ID: <87bq1e7so2.fsf@xs4all.nl> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: by XS4ALL Virus Scanner X-detected-kernel: by monty-python.gnu.org: FreeBSD 4.6-4.9 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: Thu, 03 Jul 2008 17:53:50 -0000 Pavel Roskin writes: > On Wed, 2008-07-02 at 20:46 +0300, Vesa J=E4=E4skel=E4inen wrote: > >> If reiserfs is using it in wrong place, fix the reiserfs. If you are=20 >> reading some file system variable, then you should use grub_uintN_t to=20 >> specify storage size in bits. > > OK, I'll have another look at the code. > >> size_t is usually used as common index or offset (or size) to some=20 >> buffer. size_t is returned by sizeof(). It is meant to be optimal size=20 >> for platform. Eg. on 64bit memory bus it is 64bit and on 32bit memory=20 >> bus it is 32bit. What grub is doing here is just defining yet another=20 >> type for the same thing. >>=20 >> Google for size_t if you want to find out more about it. > > I know what it is. I believe int should be as good as size_t for most > purposes is we are not working with very large structures or read > gigabytes of data from files at once. Perhaps, but it doesn't hurt either. I think it is a good thing to have a type such that it is clear what kind of variable is used. -- Marco