aboutsummaryrefslogtreecommitdiff
path: root/hw/multiboot.c
diff options
context:
space:
mode:
authorIsaku Yamahata <yamahata@valinux.co.jp>2010-05-27 14:37:09 +0900
committerBlue Swirl <blauwirbel@gmail.com>2010-06-10 16:49:28 +0000
commitbd418d90d0c67d7ea88420c6754a4677c09f91c1 (patch)
treeabb9a4e1c2d93e3abb61a3205d646731f561200c /hw/multiboot.c
parentfe7f9567a6934566641751df233cb45675a9130c (diff)
multiboot: compilation fix with DEBUG_MULTIBOOT enabled.
This patch fixes the following compilation errors in multiboot.c when DEBUG_MULTIBOOT is defined. Use TARGET_FMT_plx instead of %x for target_phys_addr_t. CC i386-softmmu/multiboot.o cc1: warnings being treated as errors qemu/hw/multiboot.c: In function 'mb_add_mod': qemu/hw/multiboot.c:121: error: format '%08x' expects type 'unsigned int', but argument 4 has type 'target_phys_addr_t' qemu/hw/multiboot.c:121: error: format '%08x' expects type 'unsigned int', but argument 5 has type 'target_phys_addr_t' qemu/hw/multiboot.c: In function 'load_multiboot': qemu/hw/multiboot.c:279: error: format '%#x' expects type 'unsigned int', but argument 5 has type 'target_phys_addr_t' qemu/hw/multiboot.c:307: error: format '%x' expects type 'unsigned int', but argument 3 has type 'target_phys_addr_t' qemu/hw/multiboot.c:308: error: format '%x' expects type 'unsigned int', but argument 3 has type 'target_phys_addr_t' make[1]: *** [multiboot.o] Error 1 Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw/multiboot.c')
-rw-r--r--hw/multiboot.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/hw/multiboot.c b/hw/multiboot.c
index a1b665cd41..dc980e6498 100644
--- a/hw/multiboot.c
+++ b/hw/multiboot.c
@@ -118,7 +118,8 @@ static void mb_add_mod(MultibootState *s,
stl_p(p + MB_MOD_END, end);
stl_p(p + MB_MOD_CMDLINE, cmdline_phys);
- mb_debug("mod%02d: %08x - %08x\n", s->mb_mods_count, start, end);
+ mb_debug("mod%02d: "TARGET_FMT_plx" - "TARGET_FMT_plx"\n",
+ s->mb_mods_count, start, end);
s->mb_mods_count++;
}
@@ -276,7 +277,7 @@ int load_multiboot(void *fw_cfg,
mb_add_mod(&mbs, mbs.mb_buf_phys + offs,
mbs.mb_buf_phys + offs + mb_mod_length, c);
- mb_debug("mod_start: %p\nmod_end: %p\n cmdline: %#x\n",
+ mb_debug("mod_start: %p\nmod_end: %p\n cmdline: "TARGET_FMT_plx"\n",
(char *)mbs.mb_buf + offs,
(char *)mbs.mb_buf + offs + mb_mod_length, c);
initrd_filename = next_initrd+1;
@@ -304,8 +305,8 @@ int load_multiboot(void *fw_cfg,
stl_p(bootinfo + MBI_MMAP_ADDR, ADDR_E820_MAP);
mb_debug("multiboot: mh_entry_addr = %#x\n", mh_entry_addr);
- mb_debug(" mb_buf_phys = %x\n", mbs.mb_buf_phys);
- mb_debug(" mod_start = %x\n", mbs.mb_buf_phys + mbs.offset_mods);
+ mb_debug(" mb_buf_phys = "TARGET_FMT_plx"\n", mbs.mb_buf_phys);
+ mb_debug(" mod_start = "TARGET_FMT_plx"\n", mbs.mb_buf_phys + mbs.offset_mods);
mb_debug(" mb_mods_count = %d\n", mbs.mb_mods_count);
/* save bootinfo off the stack */