Grub Development Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Smiechowicz <deadwood@wp.pl>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: [PATCH] Corrections to affs and sfs
Date: Wed, 11 Feb 2009 20:39:43 +0100	[thread overview]
Message-ID: <4993297F.6020705@wp.pl> (raw)
In-Reply-To: <4963988E.1010304@wp.pl>

[-- Attachment #1: Type: text/plain, Size: 244 bytes --]

> Hello,
> 
> Any news about applying this patch? :)
> 

Hello,

I'm resubmitting the updated patch.

Changelog:

2009-02-11 Krzysztof Smiechowicz <deadwood@wp.pl>
	* fs/sfs.c (grub_sfs_read_extent) : Correction to traversing 		extent 
b-tree


[-- Attachment #2: sfs.c.diff --]
[-- Type: text/x-diff, Size: 956 bytes --]

Index: fs/sfs.c
===================================================================
--- fs/sfs.c	(wersja 1940)
+++ fs/sfs.c	(kopia robocza)
@@ -172,7 +172,7 @@
 	  return grub_errno;
 	}
 
-      for (i = 0; i < grub_be_to_cpu16 (tree->nodes); i++)
+      for (i = grub_be_to_cpu16(tree->nodes) - 1; i >= 0; i--)
 	{
 
 #define EXTNODE(tree, index)						\
@@ -180,17 +180,9 @@
 					 + (index) * (tree)->nodesize))
 
 	  /* 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;
 	    }


  parent reply	other threads:[~2009-02-11 19:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-22 19:55 [PATCH] Corrections to affs and sfs Krzysztof Smiechowicz
2008-11-28 20:14 ` Robert Millan
2008-11-29  8:27   ` Krzysztof Smiechowicz
2009-01-06 17:44   ` Krzysztof Smiechowicz
2009-02-07 20:33     ` Robert Millan
2009-02-11 19:39     ` Krzysztof Smiechowicz [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-02-22  1:30 Kalamatee
2009-02-27 19:51 ` Robert Millan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4993297F.6020705@wp.pl \
    --to=deadwood@wp.pl \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox