diff options
author | Li Zhijian | 2018-09-13 12:07:13 +0200 |
---|---|---|
committer | Paolo Bonzini | 2018-10-02 19:08:49 +0200 |
commit | f3839fda5771596152b75dd1e1a6d050e6e6e380 (patch) | |
tree | 9ed6a77cef8a1165d2cbc20a3b2cf11ea2db03b5 /hw/moxie/moxiesim.c | |
parent | Delete PID file on exit (diff) | |
download | qemu-f3839fda5771596152b75dd1e1a6d050e6e6e380.tar.gz qemu-f3839fda5771596152b75dd1e1a6d050e6e6e380.tar.xz qemu-f3839fda5771596152b75dd1e1a6d050e6e6e380.zip |
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 <lizhijian@cn.fujitsu.com>
Message-Id: <1536833233-14121-1-git-send-email-lizhijian@cn.fujitsu.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/moxie/moxiesim.c')
-rw-r--r-- | hw/moxie/moxiesim.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/moxie/moxiesim.c b/hw/moxie/moxiesim.c index d41247dbdc..4b0ce09c5e 100644 --- a/hw/moxie/moxiesim.c +++ b/hw/moxie/moxiesim.c @@ -54,8 +54,8 @@ typedef struct { static void load_kernel(MoxieCPU *cpu, LoaderParams *loader_params) { uint64_t entry, kernel_low, kernel_high; + int64_t initrd_size; long kernel_size; - long initrd_size; ram_addr_t initrd_offset; kernel_size = load_elf(loader_params->kernel_filename, NULL, NULL, |