grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Corrections to affs and sfs


From: Krzysztof Smiechowicz
Subject: Re: [PATCH] Corrections to affs and sfs
Date: Wed, 11 Feb 2009 20:39:43 +0100
User-agent: Thunderbird 2.0.0.19 (X11/20090105)

Hello,

Any news about applying this patch? :)


Hello,

I'm resubmitting the updated patch.

Changelog:

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

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;
            }


reply via email to

[Prev in Thread] Current Thread [Next in Thread]