]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* grub-core/lib/relocator.c (grub_relocator_subchunk): Remove now
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Fri, 22 Oct 2010 20:49:36 +0000 (22:49 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Fri, 22 Oct 2010 20:49:36 +0000 (22:49 +0200)
useless field head. All users updated.
(free_subchunk): Correct handling of IN_REGION subchunk.

ChangeLog
grub-core/lib/relocator.c

index 00ec9d6a56b2e37b92d64131d5189cc73e6dbe5f..85ff4d08875e4fb0fbb1b7a127fd8982c11f86cc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-10-22  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * grub-core/lib/relocator.c (grub_relocator_subchunk): Remove now
+       useless field head. All users updated.
+       (free_subchunk): Correct handling of IN_REGION subchunk.
+
 2010-10-22  Colin Watson  <cjwatson@ubuntu.com>
 
        * docs/grub.texi (Installing GRUB using grub-install): Proofread.
index b1412e73a2d35f1147fe17f36a8ebd5b358b602e..90f6802d74c25f98fab04fc8a36adbb547991745 100644 (file)
@@ -40,7 +40,6 @@ struct grub_relocator_subchunk
 #endif
   } type;
   grub_mm_region_t reg;
-  grub_mm_header_t head;
   grub_phys_addr_t start;
   grub_size_t size;
   grub_size_t pre_size;
@@ -355,11 +354,11 @@ free_subchunk (const struct grub_relocator_subchunk *subchu)
       }
     case CHUNK_TYPE_IN_REGION:
       {
-       grub_mm_header_t h = (grub_mm_header_t) ALIGN_DOWN ((grub_addr_t) subchu->head,
+       grub_mm_header_t h = (grub_mm_header_t) ALIGN_DOWN ((grub_addr_t) subchu->start,
                                                            GRUB_MM_ALIGN);
        h->size
          = ((subchu->start + subchu->size + GRUB_MM_ALIGN - 1) / GRUB_MM_ALIGN)
-         - (subchu->start / GRUB_MM_ALIGN);
+         - (subchu->start / GRUB_MM_ALIGN) - 1;
        h->next = h;
        h->magic = GRUB_MM_ALLOC_MAGIC;
        grub_free (h + 1);
@@ -971,7 +970,6 @@ malloc_in_range (struct grub_relocator *rel,
                    || typepre == CHUNK_TYPE_IN_REGION)
                  {
                    curschu->reg = events[last_start].reg;
-                   curschu->head = events[last_start].head;
                    curschu->pre_size = alloc_start - events[j - 1].pos;
                  }
                if (!oom && (typepre == CHUNK_TYPE_REGION_START