From: Ian Jackson Date: Fri, 12 Sep 2008 15:35:04 +0000 (+0100) Subject: vram_addr is 64-bit so print it that way in log messages X-Git-Tag: t.master-before-merge~86 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=47c3374897eb5cfe5e6b7d5be42d406dbf45b265;p=qemu-xen-4.2-testing.git vram_addr is 64-bit so print it that way in log messages Various log messages would print it as %lx. We add a cast to unsigned long long and use %llx, which makes the output accurate and gets rid of some warnings. --- diff --git a/hw/vga.c b/hw/vga.c index 9ca92786f..8e5a2c176 100644 --- a/hw/vga.c +++ b/hw/vga.c @@ -2023,7 +2023,8 @@ void xen_vga_populate_vram(uint64_t vram_addr) int i; int rc; - fprintf(logfile, "populating video RAM at %lx\n", vram_addr); + fprintf(logfile, "populating video RAM at %llx\n", + (unsigned long long)vram_addr); nr_pfn = VGA_RAM_SIZE >> TARGET_PAGE_BITS; @@ -2060,7 +2061,8 @@ void xen_vga_vram_map(uint64_t vram_addr, int copy) int i; void *vram; - fprintf(logfile, "mapping video RAM from %lx\n", vram_addr); + fprintf(logfile, "mapping video RAM from %llx\n", + (unsigned long long)vram_addr); nr_pfn = VGA_RAM_SIZE >> TARGET_PAGE_BITS; @@ -2074,8 +2076,8 @@ void xen_vga_vram_map(uint64_t vram_addr, int copy) pfn_list, nr_pfn); if (!vram) { - fprintf(stderr, "Failed to map vram nr_pfn=%lu vram_addr=%lx: %s\n", - nr_pfn, (unsigned long)vram_addr, strerror(errno)); + fprintf(stderr, "Failed to map vram nr_pfn=0x%lx vram_addr=%llx: %s\n", + nr_pfn, (unsigned long long)vram_addr, strerror(errno)); exit(1); } @@ -2104,7 +2106,8 @@ void xen_vga_vram_map(uint64_t vram_addr, int copy) /* Called at boot time when the BIOS has allocated video RAM */ void xen_vga_stolen_vram_addr(uint64_t stolen_vram_addr) { - fprintf(logfile, "stolen video RAM at %lx\n", stolen_vram_addr); + fprintf(logfile, "stolen video RAM at %llx\n", + (unsigned long long)stolen_vram_addr); xen_vga_state->stolen_vram_addr = stolen_vram_addr;