From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1LKFz2-0005N5-9O for mharc-grub-devel@gnu.org; Tue, 06 Jan 2009 12:44:52 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LKFyz-0005Mx-VN for grub-devel@gnu.org; Tue, 06 Jan 2009 12:44:49 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LKFyy-0005Ml-PU for grub-devel@gnu.org; Tue, 06 Jan 2009 12:44:49 -0500 Received: from [199.232.76.173] (port=35636 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LKFyy-0005Mi-MG for grub-devel@gnu.org; Tue, 06 Jan 2009 12:44:48 -0500 Received: from mx1.wp.pl ([212.77.101.5]:48963) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LKFyy-0001GL-8O for grub-devel@gnu.org; Tue, 06 Jan 2009 12:44:48 -0500 Received: (wp-smtpd smtp.wp.pl 5262 invoked from network); 6 Jan 2009 18:44:26 +0100 Received: from 77-254-244-40.adsl.inetia.pl (HELO [192.168.1.2]) (deadwood@[77.254.244.40]) (envelope-sender ) by smtp.wp.pl (WP-SMTPD) with AES256-SHA encrypted SMTP for ; 6 Jan 2009 18:44:26 +0100 Message-ID: <4963988E.1010304@wp.pl> Date: Tue, 06 Jan 2009 18:44:46 +0100 From: Krzysztof Smiechowicz User-Agent: Thunderbird 2.0.0.18 (X11/20081125) MIME-Version: 1.0 To: The development of GRUB 2 References: <492863A7.7090902@wp.pl> <20081128201408.GG7980@thorin> In-Reply-To: <20081128201408.GG7980@thorin> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-WP-AV: skaner antywirusowy poczty Wirtualnej Polski S. A. X-WP-SPAM: NO 0000005 [ERcW] X-detected-operating-system: by monty-python.gnu.org: Solaris 10 (1203?) 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: Tue, 06 Jan 2009 17:44:50 -0000 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? :) Best regards, Krzysztof AROS Development Team