From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1LVtsY-0005pM-IG for mharc-grub-devel@gnu.org; Sat, 07 Feb 2009 15:34:18 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LVtsX-0005oe-6H for grub-devel@gnu.org; Sat, 07 Feb 2009 15:34:17 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LVtsW-0005ng-59 for grub-devel@gnu.org; Sat, 07 Feb 2009 15:34:16 -0500 Received: from [199.232.76.173] (port=37135 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LVtsV-0005na-TU for grub-devel@gnu.org; Sat, 07 Feb 2009 15:34:16 -0500 Received: from aybabtu.com ([69.60.117.155]:43929) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LVtsV-0005Mg-Gl for grub-devel@gnu.org; Sat, 07 Feb 2009 15:34:15 -0500 Received: from [192.168.10.10] (helo=thorin) by aybabtu.com with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1LVtnH-000608-Cf for grub-devel@gnu.org; Sat, 07 Feb 2009 21:28:51 +0100 Received: from rmh by thorin with local (Exim 4.63) (envelope-from ) id 1LVtrz-0000nU-Ct for grub-devel@gnu.org; Sat, 07 Feb 2009 21:33:43 +0100 Date: Sat, 7 Feb 2009 21:33:43 +0100 From: Robert Millan To: The development of GRUB 2 Message-ID: <20090207203343.GG988@thorin> References: <492863A7.7090902@wp.pl> <20081128201408.GG7980@thorin> <4963988E.1010304@wp.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4963988E.1010304@wp.pl> Organization: free as in freedom X-Message-Flag: Worried about Outlook viruses? Switch to Thunderbird! www.mozilla.com/thunderbird X-Debbugs-No-Ack: true User-Agent: Mutt/1.5.13 (2006-08-11) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Subject: Re: [PATCH] Corrections to affs and sfs 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: Sat, 07 Feb 2009 20:34:17 -0000 On Tue, Jan 06, 2009 at 06:44:46PM +0100, Krzysztof Smiechowicz wrote: > Robert Millan pisze: > > >>Index: fs/sfs.c > >>=================================================================== > >>--- fs/sfs.c (revision 1919) > >>+++ fs/sfs.c (working copy) > >>@@ -172,7 +172,8 @@ > >> return grub_errno; > >> } > >> > >>- for (i = 0; i < grub_be_to_cpu16 (tree->nodes); i++) > >>+ grub_uint16_t nodescount = grub_be_to_cpu16(tree->nodes); > >>+ for (i = nodescount - 1; i >= 0; i--) > > > >nodescount is only used once; why adding a variable? > > > >> /* Follow the tree down to the leaf level. */ > >>- if ((grub_be_to_cpu32 (EXTNODE(tree, i)->key) >= block) > >>+ if ((grub_be_to_cpu32 (EXTNODE(tree, i)->key) <= block) > >> && !tree->leaf) > >> { > >>- next = grub_be_to_cpu32 (EXTNODE (tree, i - 1)->data); > >>- break; > >>- } > >>- > >>- /* In case the last node is reached just use that one, it is > >>- the right match. */ > >>- if (i + 1 == grub_be_to_cpu16 (tree->nodes) && !tree->leaf) > >>- { > >> next = grub_be_to_cpu32 (EXTNODE (tree, i)->data); > >> break; > >> } > > > >I'm not familiar with our SFS code. Marco, if you have a minute could you > >review this part? > > > > Hello, > > Any news about applying this patch? :) Since Marco (who wrote that file) is not currently active, and nobody else seems to be able to test and/or proofread it, we could just trust that you know what you're doing. Please, could you resend the patch without the unneeded 'nodescount' and a ChangeLog entry? -- Robert Millan The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and how) you may access your data; but nobody's threatening your freedom: we still allow you to remove your data and not access it at all."