aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Kardashevskiy <aik@ozlabs.ru>2014-02-04 15:04:17 +1100
committerAlexander Graf <agraf@suse.de>2014-03-05 03:06:46 +0100
commit6a2331d12ee7ca9fbcf2a3c22109513ca561a51e (patch)
tree3dd895dbbf67b61e38bf311bd276f43fca89cab2
parent133e70ee8831992e309f74c20084bc50e3bcf8e0 (diff)
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>
-rw-r--r--hw/moxie/moxiesim.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/moxie/moxiesim.c b/hw/moxie/moxiesim.c
index ef4f3a84d7..a87ca6ddcc 100644
--- a/hw/moxie/moxiesim.c
+++ b/hw/moxie/moxiesim.c
@@ -55,7 +55,7 @@ static void load_kernel(MoxieCPU *cpu, LoaderParams *loader_params)
&entry, &kernel_low, &kernel_high, 1,
ELF_MACHINE, 0);
- if (!kernel_size) {
+ if (kernel_size <= 0) {
fprintf(stderr, "qemu: could not load kernel '%s'\n",
loader_params->kernel_filename);
exit(1);