From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KETqq-0005UI-3M for mharc-grub-devel@gnu.org; Thu, 03 Jul 2008 14:48:16 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KETqo-0005Th-Gn for grub-devel@gnu.org; Thu, 03 Jul 2008 14:48:14 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KETqn-0005TB-FV for grub-devel@gnu.org; Thu, 03 Jul 2008 14:48:14 -0400 Received: from [199.232.76.173] (port=51455 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KETqn-0005T6-Bb for grub-devel@gnu.org; Thu, 03 Jul 2008 14:48:13 -0400 Received: from c60.cesmail.net ([216.154.195.49]:62470) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.60) (envelope-from ) id 1KETqm-0007zV-S3 for grub-devel@gnu.org; Thu, 03 Jul 2008 14:48:13 -0400 Received: from unknown (HELO relay.cesmail.net) ([192.168.1.81]) by c60.cesmail.net with ESMTP; 03 Jul 2008 14:48:08 -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 8BC5F618F22 for ; Thu, 3 Jul 2008 14:48:08 -0400 (EDT) From: Pavel Roskin To: The development of GRUB 2 In-Reply-To: <87tzf66d6w.fsf@xs4all.nl> References: <20080702001046.7554.37059.stgit@dv.roinet.com> <87tzf66d6w.fsf@xs4all.nl> Content-Type: text/plain Date: Thu, 03 Jul 2008 14:48:07 -0400 Message-Id: <1215110887.4585.35.camel@dv> Mime-Version: 1.0 X-Mailer: Evolution 2.22.2 (2.22.2-2.fc9) Content-Transfer-Encoding: 7bit X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. Subject: Re: [PATCH] Fix warning in fs/xfs.c 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 18:48:14 -0000 On Thu, 2008-07-03 at 20:21 +0200, Marco Gerards wrote: > Pavel Roskin writes: > > > ChangeLog: > > * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to > > those in Linux XFS code. Provide a way to access 64-bit parent > > inode. > > (grub_xfs_iterate_dir): Use the new names. Avoid reading past > > the end of struct grub_xfs_dir_header. > > *please* do not look at Linux code or whatever *and* contribute to > GRUB. It might cause copyright troubles I will have to deal with :-/ I just tried to make names similar without copying any code. But it's a useful reminder. > I do not see the advantage of this patch. Can you please explain why > we need these name changes? We were casting a pointer to a 32-bit integer to a pointer to a 64-bit integer, which is bad, and gcc was emitting a warning about it. Worse yet, the 64-bit value was "sticking" beyond the end the structure we were using to describe the header. i4 and i8 are generally used by Linux XFS code to describe 32-bit and 64-bit values if either can be used. The "smallino" field was highly misleading because it had to be negated. It's the number of "big" (i8 or 64-bit) entries. If it's 0, then the entries are "small". So it was natural to call it "i8count". And once it was "i8count", it was natural to call the first value "count". If you prefer another naming convention, let's rename the entries according to it. I was thinking having 2 32-bit integers "parent_hi" and "parent_lo" or something like that. Anyway, let's not use "smallino" - "bigentries" would be better. -- Regards, Pavel Roskin