a5bd9f6
From 2e26bf539522207793cbdb2f26241273bb41d8fe Mon Sep 17 00:00:00 2001
a5bd9f6
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
a5bd9f6
Date: Wed, 6 Feb 2013 17:37:29 +0100
a5bd9f6
Subject: [PATCH 152/364] 	* grub-core/commands/lsacpi.c: Fix types on
a5bd9f6
 64-bit platform.
a5bd9f6
a5bd9f6
---
a5bd9f6
 ChangeLog                   |  4 ++++
a5bd9f6
 grub-core/commands/lsacpi.c | 21 ++++++++++++++-------
a5bd9f6
 2 files changed, 18 insertions(+), 7 deletions(-)
a5bd9f6
a5bd9f6
diff --git a/ChangeLog b/ChangeLog
a5bd9f6
index 0994ee7..3731229 100644
a5bd9f6
--- a/ChangeLog
a5bd9f6
+++ b/ChangeLog
a5bd9f6
@@ -1,3 +1,7 @@
a5bd9f6
+2013-02-06  Vladimir Serbinenko  <phcoder@gmail.com>
a5bd9f6
+
a5bd9f6
+	* grub-core/commands/lsacpi.c: Fix types on 64-bit platform.
a5bd9f6
+
a5bd9f6
 2013-02-04  Vladimir Serbinenko  <phcoder@gmail.com>
a5bd9f6
 
a5bd9f6
 	* grub-core/disk/cryptodisk.c (grub_cryptodisk_scan_device): Don't stop
a5bd9f6
diff --git a/grub-core/commands/lsacpi.c b/grub-core/commands/lsacpi.c
a5bd9f6
index 1038479..0824914 100644
a5bd9f6
--- a/grub-core/commands/lsacpi.c
a5bd9f6
+++ b/grub-core/commands/lsacpi.c
a5bd9f6
@@ -75,7 +75,8 @@ disp_madt_table (struct grub_acpi_madt *t)
a5bd9f6
 	    grub_printf ("  LAPIC ACPI_ID=%02x APIC_ID=%02x Flags=%08x\n",
a5bd9f6
 			 dt->acpiid, dt->apicid, dt->flags);
a5bd9f6
 	    if (dt->hdr.len != sizeof (*dt))
a5bd9f6
-	      grub_printf ("   table size mismatch %d != %d\n", dt->hdr.len, sizeof (*dt));
a5bd9f6
+	      grub_printf ("   table size mismatch %d != %d\n", dt->hdr.len,
a5bd9f6
+			   (int) sizeof (*dt));
a5bd9f6
 	    break;
a5bd9f6
 	  }
a5bd9f6
 
a5bd9f6
@@ -85,7 +86,8 @@ disp_madt_table (struct grub_acpi_madt *t)
a5bd9f6
 	    grub_printf ("  IOAPIC ID=%02x address=%08x GSI=%08x\n",
a5bd9f6
 			 dt->id, dt->address, dt->global_sys_interrupt);
a5bd9f6
 	    if (dt->hdr.len != sizeof (*dt))
a5bd9f6
-	      grub_printf ("   table size mismatch %d != %d\n", dt->hdr.len, sizeof (*dt));
a5bd9f6
+	      grub_printf ("   table size mismatch %d != %d\n", dt->hdr.len,
a5bd9f6
+			   (int) sizeof (*dt));
a5bd9f6
 	    if (dt->pad)
a5bd9f6
 	      grub_printf ("   non-zero pad: %02x\n", dt->pad);
a5bd9f6
 	    break;
a5bd9f6
@@ -98,7 +100,8 @@ disp_madt_table (struct grub_acpi_madt *t)
a5bd9f6
 			 dt->bus, dt->source, dt->global_sys_interrupt,
a5bd9f6
 			 dt->flags);
a5bd9f6
 	    if (dt->hdr.len != sizeof (*dt))
a5bd9f6
-	      grub_printf ("   table size mismatch %d != %d\n", dt->hdr.len, sizeof (*dt));
a5bd9f6
+	      grub_printf ("   table size mismatch %d != %d\n", dt->hdr.len,
a5bd9f6
+			   (int) sizeof (*dt));
a5bd9f6
 	  }
a5bd9f6
 	  break;
a5bd9f6
 
a5bd9f6
@@ -108,7 +111,8 @@ disp_madt_table (struct grub_acpi_madt *t)
a5bd9f6
 	    grub_printf ("  LAPIC_NMI ACPI_ID=%02x Flags=%04x lint=%02x\n",
a5bd9f6
 			 dt->acpiid, dt->flags, dt->lint);
a5bd9f6
 	    if (dt->hdr.len != sizeof (*dt))
a5bd9f6
-	      grub_printf ("   table size mismatch %d != %d\n", dt->hdr.len, sizeof (*dt));
a5bd9f6
+	      grub_printf ("   table size mismatch %d != %d\n", dt->hdr.len,
a5bd9f6
+			   (int) sizeof (*dt));
a5bd9f6
 	    break;
a5bd9f6
 	  }
a5bd9f6
 
a5bd9f6
@@ -120,7 +124,8 @@ disp_madt_table (struct grub_acpi_madt *t)
a5bd9f6
 			 dt->id, dt->global_sys_interrupt_base,
a5bd9f6
 			 dt->addr);
a5bd9f6
 	    if (dt->hdr.len != sizeof (*dt))
a5bd9f6
-	      grub_printf ("   table size mismatch %d != %d\n", dt->hdr.len, sizeof (*dt));
a5bd9f6
+	      grub_printf ("   table size mismatch %d != %d\n", dt->hdr.len,
a5bd9f6
+			   (int) sizeof (*dt));
a5bd9f6
 	    if (dt->pad)
a5bd9f6
 	      grub_printf ("   non-zero pad: %02x\n", dt->pad);
a5bd9f6
 
a5bd9f6
@@ -139,7 +144,8 @@ disp_madt_table (struct grub_acpi_madt *t)
a5bd9f6
 	      grub_printf ("  UID val=%08x, Str=%s\n", dt->cpu_uid,
a5bd9f6
 			   dt->cpu_uid_str);
a5bd9f6
 	    if (dt->hdr.len != sizeof (*dt) + grub_strlen ((char *) dt->cpu_uid_str) + 1)
a5bd9f6
-	      grub_printf ("   table size mismatch %d != %d\n", dt->hdr.len, sizeof (*dt));
a5bd9f6
+	      grub_printf ("   table size mismatch %d != %d\n", dt->hdr.len,
a5bd9f6
+			   (int) sizeof (*dt));
a5bd9f6
 	    if (dt->pad[0] || dt->pad[1] || dt->pad[2])
a5bd9f6
 	      grub_printf ("   non-zero pad: %02x%02x%02x\n", dt->pad[0], dt->pad[1], dt->pad[2]);
a5bd9f6
 	  }
a5bd9f6
@@ -239,7 +245,8 @@ disp_acpi_rsdpv2 (struct grub_acpi_rsdp_v20 *rsdp)
a5bd9f6
   grub_printf ("len=%d chksum=%02x (%s) XSDT=%016" PRIxGRUB_UINT64_T "\n", rsdp->length, rsdp->checksum, grub_byte_checksum (rsdp, rsdp->length) == 0 ? "valid" : "invalid",
a5bd9f6
 	       rsdp->xsdt_addr);
a5bd9f6
   if (rsdp->length != sizeof (*rsdp))
a5bd9f6
-    grub_printf (" length mismatch %d != %d\n", rsdp->length, sizeof (*rsdp));
a5bd9f6
+    grub_printf (" length mismatch %d != %d\n", rsdp->length,
a5bd9f6
+		 (int) sizeof (*rsdp));
a5bd9f6
   if (rsdp->reserved[0] || rsdp->reserved[1] || rsdp->reserved[2])
a5bd9f6
     grub_printf (" non-zero reserved %02x%02x%02x\n", rsdp->reserved[0], rsdp->reserved[1], rsdp->reserved[2]);
a5bd9f6
 }
a5bd9f6
-- 
a5bd9f6
1.8.1.4
a5bd9f6