i386: make struct linux_kernel_header architecture specific

struct linux_kernel_header -> struct linux_i386_kernel_header

Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
Leif Lindholm 2018-02-01 18:18:52 +00:00 committed by Vincent Batts
parent 1901a159bd
commit 103779a19e
5 changed files with 7 additions and 7 deletions

View file

@ -497,7 +497,7 @@ grub_cmd_file (grub_extcmd_context_t ctxt, int argc, char **args)
case IS_X86_LINUX32: case IS_X86_LINUX32:
case IS_X86_LINUX: case IS_X86_LINUX:
{ {
struct linux_kernel_header lh; struct linux_i386_kernel_header lh;
if (grub_file_read (file, &lh, sizeof (lh)) != sizeof (lh)) if (grub_file_read (file, &lh, sizeof (lh)) != sizeof (lh))
break; break;
if (lh.boot_flag != grub_cpu_to_le16_compile_time (0xaa55)) if (lh.boot_flag != grub_cpu_to_le16_compile_time (0xaa55))

View file

@ -681,7 +681,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
int argc, char *argv[]) int argc, char *argv[])
{ {
grub_file_t file = 0; grub_file_t file = 0;
struct linux_kernel_header lh; struct linux_i386_kernel_header lh;
grub_uint8_t setup_sects; grub_uint8_t setup_sects;
grub_size_t real_size, prot_size, prot_file_size, kernel_offset; grub_size_t real_size, prot_size, prot_file_size, kernel_offset;
grub_ssize_t len; grub_ssize_t len;

View file

@ -122,7 +122,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
int argc, char *argv[]) int argc, char *argv[])
{ {
grub_file_t file = 0; grub_file_t file = 0;
struct linux_kernel_header lh; struct linux_i386_kernel_header lh;
grub_uint8_t setup_sects; grub_uint8_t setup_sects;
grub_size_t real_size, kernel_offset = 0; grub_size_t real_size, kernel_offset = 0;
grub_ssize_t len; grub_ssize_t len;
@ -399,7 +399,7 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
{ {
grub_size_t size = 0; grub_size_t size = 0;
grub_addr_t addr_max, addr_min; grub_addr_t addr_max, addr_min;
struct linux_kernel_header *lh; struct linux_i386_kernel_header *lh;
grub_uint8_t *initrd_chunk; grub_uint8_t *initrd_chunk;
grub_addr_t initrd_addr; grub_addr_t initrd_addr;
grub_err_t err; grub_err_t err;
@ -417,7 +417,7 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
goto fail; goto fail;
} }
lh = (struct linux_kernel_header *) grub_linux_real_chunk; lh = (struct linux_i386_kernel_header *) grub_linux_real_chunk;
if (!(lh->header == grub_cpu_to_le32_compile_time (GRUB_LINUX_I386_MAGIC_SIGNATURE) if (!(lh->header == grub_cpu_to_le32_compile_time (GRUB_LINUX_I386_MAGIC_SIGNATURE)
&& grub_le_to_cpu16 (lh->version) >= 0x0200)) && grub_le_to_cpu16 (lh->version) >= 0x0200))

View file

@ -35,7 +35,7 @@ grub_xen_file_and_cmdline (grub_file_t file,
grub_size_t cmdline_max_len) grub_size_t cmdline_max_len)
{ {
grub_elf_t elf; grub_elf_t elf;
struct linux_kernel_header lh; struct linux_i386_kernel_header lh;
grub_file_t off_file; grub_file_t off_file;
grub_uint32_t payload_offset, payload_length; grub_uint32_t payload_offset, payload_length;
grub_uint8_t magic[6]; grub_uint8_t magic[6];

View file

@ -85,7 +85,7 @@ enum
}; };
/* For the Linux/i386 boot protocol version 2.10. */ /* For the Linux/i386 boot protocol version 2.10. */
struct linux_kernel_header struct linux_i386_kernel_header
{ {
grub_uint8_t code1[0x0020]; grub_uint8_t code1[0x0020];
grub_uint16_t cl_magic; /* Magic number 0xA33F */ grub_uint16_t cl_magic; /* Magic number 0xA33F */