2008-11-07 Robert Millan <rmh@aybabtu.com>
* include/multiboot2.h (struct multiboot_header): Add `flags' member as
per specification.
* loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
* loader/multiboot_loader.c (find_multi_boot2_header): New function
(based on find_multi_boot1_header).
(grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
using find_multi_boot2_header(), and abort if neither Multiboot or
Multiboot headers were found.
This commit is contained in:
parent
9f3af64471
commit
c32ee8c9a8
4 changed files with 47 additions and 9 deletions
|
|
@ -342,8 +342,8 @@ grub_multiboot2 (int argc, char *argv[])
|
|||
}
|
||||
|
||||
/* Look for the multiboot header in the buffer. The header should
|
||||
be at least 12 bytes and aligned on a 4-byte boundary. */
|
||||
for (p = buffer; p <= buffer + len - 12; p += 4)
|
||||
be at least 8 bytes and aligned on a 8-byte boundary. */
|
||||
for (p = buffer; p <= buffer + len - 8; p += 8)
|
||||
{
|
||||
header = (struct multiboot_header *) p;
|
||||
if (header->magic == MULTIBOOT2_HEADER_MAGIC)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue