mirror of
https://src.fedoraproject.org/rpms/grub2.git
synced 2024-11-25 06:37:33 +00:00
41 lines
1.4 KiB
Diff
41 lines
1.4 KiB
Diff
|
From 5657a74faa6aa56753f42e65b0806afb3cb7c842 Mon Sep 17 00:00:00 2001
|
||
|
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
|
||
|
Date: Mon, 21 Jan 2013 22:44:20 +0100
|
||
|
Subject: [PATCH 138/364] * include/grub/kernel.h (FOR_MODULES): Adjust
|
||
|
to preserve alignment invariants.
|
||
|
|
||
|
---
|
||
|
ChangeLog | 5 +++++
|
||
|
include/grub/kernel.h | 2 +-
|
||
|
2 files changed, 6 insertions(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/ChangeLog b/ChangeLog
|
||
|
index a2edbc5..c3405df 100644
|
||
|
--- a/ChangeLog
|
||
|
+++ b/ChangeLog
|
||
|
@@ -1,3 +1,8 @@
|
||
|
+2013-01-21 Vladimir Serbinenko <phcoder@gmail.com>
|
||
|
+
|
||
|
+ * include/grub/kernel.h (FOR_MODULES): Adjust to preserve alignment
|
||
|
+ invariants.
|
||
|
+
|
||
|
2013-01-21 Colin Watson <cjwatson@ubuntu.com>
|
||
|
|
||
|
* grub-core/font/font.c (blit_comb: do_blit): Make static instead of
|
||
|
diff --git a/include/grub/kernel.h b/include/grub/kernel.h
|
||
|
index 033479e..23e4f02 100644
|
||
|
--- a/include/grub/kernel.h
|
||
|
+++ b/include/grub/kernel.h
|
||
|
@@ -78,7 +78,7 @@ extern grub_addr_t EXPORT_VAR (grub_modbase);
|
||
|
var && (grub_addr_t) var \
|
||
|
< (grub_modbase + (((struct grub_module_info *) grub_modbase)->size)); \
|
||
|
var = (struct grub_module_header *) \
|
||
|
- ((void **) var + (((struct grub_module_header *) var)->size + sizeof (void *) - 1) / sizeof (void *)))
|
||
|
+ (((grub_uint32_t *) var) + ((((struct grub_module_header *) var)->size + sizeof (grub_addr_t) - 1) / sizeof (grub_addr_t)) * (sizeof (grub_addr_t) / sizeof (grub_uint32_t))))
|
||
|
|
||
|
grub_addr_t grub_modules_get_end (void);
|
||
|
|
||
|
--
|
||
|
1.8.1.4
|
||
|
|