From f3839fda5771596152b75dd1e1a6d050e6e6e380 Mon Sep 17 00:00:00 2001 From: Li Zhijian Date: Thu, 13 Sep 2018 18:07:13 +0800 Subject: change get_image_size return type to int64_t Previously, if the size of initrd >=2G, qemu exits with error: root@haswell-OptiPlex-9020:/home/lizj# /home/lizhijian/lkp/qemu-colo/x86_64-softmmu/qemu-system-x86_64 -kernel ./vmlinuz-4.16.0-rc4 -initrd large.cgz -nographic qemu: error reading initrd large.cgz: No such file or directory root@haswell-OptiPlex-9020:/home/lizj# du -sh large.cgz 2.5G large.cgz this patch changes the caller side that use this function to calculate size of initrd file as well. v2: update error message and int64_t printing format Signed-off-by: Li Zhijian Message-Id: <1536833233-14121-1-git-send-email-lizhijian@cn.fujitsu.com> Signed-off-by: Paolo Bonzini --- hw/mips/mips_mipssim.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'hw/mips/mips_mipssim.c') diff --git a/hw/mips/mips_mipssim.c b/hw/mips/mips_mipssim.c index 241faa1d0f..f665752a2f 100644 --- a/hw/mips/mips_mipssim.c +++ b/hw/mips/mips_mipssim.c @@ -58,9 +58,8 @@ typedef struct ResetData { static int64_t load_kernel(void) { - int64_t entry, kernel_high; + int64_t entry, kernel_high, initrd_size; long kernel_size; - long initrd_size; ram_addr_t initrd_offset; int big_endian; -- cgit v1.2.3-55-g7522