diff mbox series

[04/10] i386: make struct linux_kernel_header architecture specific

Message ID 20180201181858.1472-5-leif.lindholm@linaro.org
State New
Headers show
Series various cleanup | expand

Commit Message

Leif Lindholm Feb. 1, 2018, 6:18 p.m. UTC
struct linux_kernel_header -> struct linux_i386_kernel_header

Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>

---
 grub-core/commands/file.c        | 2 +-
 grub-core/loader/i386/linux.c    | 2 +-
 grub-core/loader/i386/pc/linux.c | 6 +++---
 grub-core/loader/i386/xen_file.c | 2 +-
 include/grub/i386/linux.h        | 2 +-
 5 files changed, 7 insertions(+), 7 deletions(-)

-- 
2.11.0


_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

Comments

Daniel Kiper Feb. 15, 2018, 10:06 a.m. UTC | #1
On Thu, Feb 01, 2018 at 06:18:52PM +0000, Leif Lindholm wrote:
> 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>


Daniel

_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel
diff mbox series

Patch

diff --git a/grub-core/commands/file.c b/grub-core/commands/file.c
index 474666d3a..63c84499b 100644
--- a/grub-core/commands/file.c
+++ b/grub-core/commands/file.c
@@ -497,7 +497,7 @@  grub_cmd_file (grub_extcmd_context_t ctxt, int argc, char **args)
     case IS_X86_LINUX32:
     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))
 	  break;
 	if (lh.boot_flag != grub_cpu_to_le16_compile_time (0xaa55))
diff --git a/grub-core/loader/i386/linux.c b/grub-core/loader/i386/linux.c
index 9bd5afb65..44301e126 100644
--- a/grub-core/loader/i386/linux.c
+++ b/grub-core/loader/i386/linux.c
@@ -678,7 +678,7 @@  grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
 		int argc, char *argv[])
 {
   grub_file_t file = 0;
-  struct linux_kernel_header lh;
+  struct linux_i386_kernel_header lh;
   grub_uint8_t setup_sects;
   grub_size_t real_size, prot_size, prot_file_size;
   grub_ssize_t len;
diff --git a/grub-core/loader/i386/pc/linux.c b/grub-core/loader/i386/pc/linux.c
index 31a687644..b69cb7a3a 100644
--- a/grub-core/loader/i386/pc/linux.c
+++ b/grub-core/loader/i386/pc/linux.c
@@ -121,7 +121,7 @@  grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
 		int argc, char *argv[])
 {
   grub_file_t file = 0;
-  struct linux_kernel_header lh;
+  struct linux_i386_kernel_header lh;
   grub_uint8_t setup_sects;
   grub_size_t real_size;
   grub_ssize_t len;
@@ -387,7 +387,7 @@  grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
 {
   grub_size_t size = 0;
   grub_addr_t addr_max, addr_min;
-  struct linux_kernel_header *lh;
+  struct linux_i386_kernel_header *lh;
   grub_uint8_t *initrd_chunk;
   grub_addr_t initrd_addr;
   grub_err_t err;
@@ -405,7 +405,7 @@  grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
       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)
 	&& grub_le_to_cpu16 (lh->version) >= 0x0200))
diff --git a/grub-core/loader/i386/xen_file.c b/grub-core/loader/i386/xen_file.c
index 6e76e16aa..77a93e7b2 100644
--- a/grub-core/loader/i386/xen_file.c
+++ b/grub-core/loader/i386/xen_file.c
@@ -26,7 +26,7 @@  grub_elf_t
 grub_xen_file (grub_file_t file)
 {
   grub_elf_t elf;
-  struct linux_kernel_header lh;
+  struct linux_i386_kernel_header lh;
   grub_file_t off_file;
   grub_uint32_t payload_offset, payload_length;
   grub_uint8_t magic[6];
diff --git a/include/grub/i386/linux.h b/include/grub/i386/linux.h
index 3ff432be9..0bd758817 100644
--- a/include/grub/i386/linux.h
+++ b/include/grub/i386/linux.h
@@ -85,7 +85,7 @@  enum
   };
 
 /* For the Linux/i386 boot protocol version 2.10.  */
-struct linux_kernel_header
+struct linux_i386_kernel_header
 {
   grub_uint8_t code1[0x0020];
   grub_uint16_t cl_magic;		/* Magic number 0xA33F */