From e138c4583608b07376f1ce1bdc0aea88875adf3a Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Fri, 22 Oct 2010 22:49:36 +0200 Subject: [PATCH] * grub-core/lib/relocator.c (grub_relocator_subchunk): Remove now useless field head. All users updated. (free_subchunk): Correct handling of IN_REGION subchunk. --- ChangeLog | 6 ++++++ grub-core/lib/relocator.c | 6 ++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 00ec9d6a5..85ff4d088 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-10-22 Vladimir Serbinenko + + * 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 * docs/grub.texi (Installing GRUB using grub-install): Proofread. diff --git a/grub-core/lib/relocator.c b/grub-core/lib/relocator.c index b1412e73a..90f6802d7 100644 --- a/grub-core/lib/relocator.c +++ b/grub-core/lib/relocator.c @@ -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