* include/grub/kernel.h (FOR_MODULES): Check module magic.
This commit is contained in:
parent
9d742bd431
commit
a132afc371
2 changed files with 5 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2012-02-29 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* include/grub/kernel.h (FOR_MODULES): Check module magic.
|
||||||
|
|
||||||
2012-02-29 Vladimir Serbinenko <phcoder@gmail.com>
|
2012-02-29 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
* util/grub-mkimagexx.c (locate_sections): Support non-standard
|
* util/grub-mkimagexx.c (locate_sections): Support non-standard
|
||||||
|
|
|
@ -72,7 +72,7 @@ struct grub_module_info64
|
||||||
extern grub_addr_t EXPORT_VAR (grub_modbase);
|
extern grub_addr_t EXPORT_VAR (grub_modbase);
|
||||||
|
|
||||||
#define FOR_MODULES(var) for (\
|
#define FOR_MODULES(var) for (\
|
||||||
var = grub_modbase ? (struct grub_module_header *) \
|
var = (grub_modbase && ((((struct grub_module_info *) grub_modbase)->magic) == GRUB_MODULE_MAGIC)) ? (struct grub_module_header *) \
|
||||||
(grub_modbase + (((struct grub_module_info *) grub_modbase)->offset)) : 0;\
|
(grub_modbase + (((struct grub_module_info *) grub_modbase)->offset)) : 0;\
|
||||||
var && (grub_addr_t) var \
|
var && (grub_addr_t) var \
|
||||||
< (grub_modbase + (((struct grub_module_info *) grub_modbase)->size)); \
|
< (grub_modbase + (((struct grub_module_info *) grub_modbase)->size)); \
|
||||||
|
|
Loading…
Reference in a new issue