mirror of
https://github.com/qemu/qemu.git
synced 2025-08-09 19:15:32 +00:00
moxie: fix load_elf() usage
At the moment in the case of error, load_elf() returns -1 so load_kernel() will not signal error at all. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
parent
133e70ee88
commit
6a2331d12e
@ -55,7 +55,7 @@ static void load_kernel(MoxieCPU *cpu, LoaderParams *loader_params)
|
|||||||
&entry, &kernel_low, &kernel_high, 1,
|
&entry, &kernel_low, &kernel_high, 1,
|
||||||
ELF_MACHINE, 0);
|
ELF_MACHINE, 0);
|
||||||
|
|
||||||
if (!kernel_size) {
|
if (kernel_size <= 0) {
|
||||||
fprintf(stderr, "qemu: could not load kernel '%s'\n",
|
fprintf(stderr, "qemu: could not load kernel '%s'\n",
|
||||||
loader_params->kernel_filename);
|
loader_params->kernel_filename);
|
||||||
exit(1);
|
exit(1);
|
||||||
|
Loading…
Reference in New Issue
Block a user