From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KE6Uk-0001YD-Ay for mharc-grub-devel@gnu.org; Wed, 02 Jul 2008 13:51:54 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KE6Ui-0001Xs-K8 for grub-devel@gnu.org; Wed, 02 Jul 2008 13:51:52 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KE6Ug-0001Wh-V2 for grub-devel@gnu.org; Wed, 02 Jul 2008 13:51:52 -0400 Received: from [199.232.76.173] (port=49732 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KE6Ug-0001Wd-PD for grub-devel@gnu.org; Wed, 02 Jul 2008 13:51:50 -0400 Received: from c60.cesmail.net ([216.154.195.49]:11854) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.60) (envelope-from ) id 1KE6Ug-0002nN-Bh for grub-devel@gnu.org; Wed, 02 Jul 2008 13:51:50 -0400 Received: from unknown (HELO relay.cesmail.net) ([192.168.1.81]) by c60.cesmail.net with ESMTP; 02 Jul 2008 13:51:49 -0400 Received: from [192.168.0.21] (static-72-92-88-10.phlapa.fios.verizon.net [72.92.88.10]) by relay.cesmail.net (Postfix) with ESMTP id 21C3E618F22 for ; Wed, 2 Jul 2008 13:51:49 -0400 (EDT) From: Pavel Roskin To: The development of GRUB 2 In-Reply-To: <486BBEF1.6000105@nic.fi> References: <1214964880.7362.17.camel@dv> <1214966028.9353.95.camel@localhost> <20080702002031.7gkuoel14wg80c0k-cebfxv@webmail.spamcop.net> <486BBEF1.6000105@nic.fi> Content-Type: text/plain; charset=ISO-8859-1 Date: Wed, 02 Jul 2008 13:51:48 -0400 Message-Id: <1215021108.29069.4.camel@dv> Mime-Version: 1.0 X-Mailer: Evolution 2.22.2 (2.22.2-2.fc9) Content-Transfer-Encoding: 8bit X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. 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 17:51:53 -0000 On Wed, 2008-07-02 at 20:46 +0300, Vesa Jääskeläinen wrote: > If reiserfs is using it in wrong place, fix the reiserfs. If you are > reading some file system variable, then you should use grub_uintN_t to > 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 > buffer. size_t is returned by sizeof(). It is meant to be optimal size > for platform. Eg. on 64bit memory bus it is 64bit and on 32bit memory > bus it is 32bit. What grub is doing here is just defining yet another > type for the same thing. > > 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. -- Regards, Pavel Roskin