yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone

Blame SOURCES/kvm-multiboot-Use-header-names-when-displaying-fields.patch

9ae3a8
From 0bd67b62f13b15c36fa66304fffd70d01382e234 Mon Sep 17 00:00:00 2001
9ae3a8
From: Kevin Wolf <kwolf@redhat.com>
9ae3a8
Date: Thu, 26 Jul 2018 16:24:45 +0200
9ae3a8
Subject: [PATCH 3/8] multiboot: Use header names when displaying fields
9ae3a8
9ae3a8
RH-Author: Kevin Wolf <kwolf@redhat.com>
9ae3a8
Message-id: <20180726162448.22072-4-kwolf@redhat.com>
9ae3a8
Patchwork-id: 81520
9ae3a8
O-Subject: [RHEL-7.6/7.5.z qemu-kvm PATCH 3/6] multiboot: Use header names when displaying fields
9ae3a8
Bugzilla: 1549822
9ae3a8
RH-Acked-by: John Snow <jsnow@redhat.com>
9ae3a8
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
9ae3a8
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
9ae3a8
9ae3a8
From: Jack Schwartz <jack.schwartz@oracle.com>
9ae3a8
9ae3a8
Refer to field names when displaying fields in printf and debug statements.
9ae3a8
9ae3a8
Signed-off-by: Jack Schwartz <jack.schwartz@oracle.com>
9ae3a8
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
9ae3a8
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
9ae3a8
(cherry picked from commit ce5eb6dc4dc5652f7e360a1db817f1d5dafab90f)
9ae3a8
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
9ae3a8
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
9ae3a8
---
9ae3a8
 hw/i386/multiboot.c | 16 ++++++++--------
9ae3a8
 1 file changed, 8 insertions(+), 8 deletions(-)
9ae3a8
9ae3a8
diff --git a/hw/i386/multiboot.c b/hw/i386/multiboot.c
9ae3a8
index ee2ebd1..c4a361f 100644
9ae3a8
--- a/hw/i386/multiboot.c
9ae3a8
+++ b/hw/i386/multiboot.c
9ae3a8
@@ -203,7 +203,7 @@ int load_multiboot(FWCfgState *fw_cfg,
9ae3a8
 
9ae3a8
         mh_load_addr = ldl_p(header+i+16);
9ae3a8
         if (mh_header_addr < mh_load_addr) {
9ae3a8
-            fprintf(stderr, "invalid mh_load_addr address\n");
9ae3a8
+            fprintf(stderr, "invalid load_addr address\n");
9ae3a8
             exit(1);
9ae3a8
         }
9ae3a8
 
9ae3a8
@@ -213,7 +213,7 @@ int load_multiboot(FWCfgState *fw_cfg,
9ae3a8
 
9ae3a8
         if (mh_load_end_addr) {
9ae3a8
             if (mh_load_end_addr < mh_load_addr) {
9ae3a8
-                fprintf(stderr, "invalid mh_load_end_addr address\n");
9ae3a8
+                fprintf(stderr, "invalid load_end_addr address\n");
9ae3a8
                 exit(1);
9ae3a8
             }
9ae3a8
             mb_load_size = mh_load_end_addr - mh_load_addr;
9ae3a8
@@ -226,7 +226,7 @@ int load_multiboot(FWCfgState *fw_cfg,
9ae3a8
         }
9ae3a8
         if (mh_bss_end_addr) {
9ae3a8
             if (mh_bss_end_addr < (mh_load_addr + mb_load_size)) {
9ae3a8
-                fprintf(stderr, "invalid mh_bss_end_addr address\n");
9ae3a8
+                fprintf(stderr, "invalid bss_end_addr address\n");
9ae3a8
                 exit(1);
9ae3a8
             }
9ae3a8
             mb_kernel_size = mh_bss_end_addr - mh_load_addr;
9ae3a8
@@ -234,10 +234,10 @@ int load_multiboot(FWCfgState *fw_cfg,
9ae3a8
             mb_kernel_size = mb_load_size;
9ae3a8
         }
9ae3a8
 
9ae3a8
-        mb_debug("multiboot: mh_header_addr = %#x\n", mh_header_addr);
9ae3a8
-        mb_debug("multiboot: mh_load_addr = %#x\n", mh_load_addr);
9ae3a8
-        mb_debug("multiboot: mh_load_end_addr = %#x\n", mh_load_end_addr);
9ae3a8
-        mb_debug("multiboot: mh_bss_end_addr = %#x\n", mh_bss_end_addr);
9ae3a8
+        mb_debug("multiboot: header_addr = %#x\n", mh_header_addr);
9ae3a8
+        mb_debug("multiboot: load_addr = %#x\n", mh_load_addr);
9ae3a8
+        mb_debug("multiboot: load_end_addr = %#x\n", mh_load_end_addr);
9ae3a8
+        mb_debug("multiboot: bss_end_addr = %#x\n", mh_bss_end_addr);
9ae3a8
         mb_debug("qemu: loading multiboot kernel (%#x bytes) at %#x\n",
9ae3a8
                  mb_load_size, mh_load_addr);
9ae3a8
 
9ae3a8
@@ -335,7 +335,7 @@ int load_multiboot(FWCfgState *fw_cfg,
9ae3a8
     stl_p(bootinfo + MBI_BOOT_DEVICE, 0x8000ffff); /* XXX: use the -boot switch? */
9ae3a8
     stl_p(bootinfo + MBI_MMAP_ADDR,   ADDR_E820_MAP);
9ae3a8
 
9ae3a8
-    mb_debug("multiboot: mh_entry_addr = %#x\n", mh_entry_addr);
9ae3a8
+    mb_debug("multiboot: entry_addr = %#x\n", mh_entry_addr);
9ae3a8
     mb_debug("           mb_buf_phys   = "TARGET_FMT_plx"\n", mbs.mb_buf_phys);
9ae3a8
     mb_debug("           mod_start     = "TARGET_FMT_plx"\n", mbs.mb_buf_phys + mbs.offset_mods);
9ae3a8
     mb_debug("           mb_mods_count = %d\n", mbs.mb_mods_count);
9ae3a8
-- 
9ae3a8
1.8.3.1
9ae3a8