Message ID | 1390368041-2184-3-git-send-email-aik@ozlabs.ru |
---|---|
State | New |
Headers | show |
On 22.01.2014, at 06:20, Alexey Kardashevskiy <aik@ozlabs.ru> wrote: > 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> Anthony (Green), could you please ack this patch? Alex > --- > hw/moxie/moxiesim.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hw/moxie/moxiesim.c b/hw/moxie/moxiesim.c > index ef4f3a8..a87ca6d 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); > -- > 1.8.4.rc4 >
diff --git a/hw/moxie/moxiesim.c b/hw/moxie/moxiesim.c index ef4f3a8..a87ca6d 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);
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> --- hw/moxie/moxiesim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)