[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] hw/unicore32: fix a kernel_filename!=NULL asser
From: |
Suramya Shah |
Subject: |
Re: [Qemu-devel] [PATCH] hw/unicore32: fix a kernel_filename!=NULL assertion error in puv3.c |
Date: |
Thu, 30 Mar 2017 20:40:42 +0530 |
Kindly have a look at the forwarded patch.
On 30-Mar-2017 8:28 PM, "Suramya Shah" <address@hidden> wrote:
> Signed-off-by: Suramya Shah <address@hidden>
> ---
> Running QEMU with qemu-system-unicore32 without the kernel parameter
> results in an assertion error.
> Fix this by..
> hw/unicore32/puv3.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/hw/unicore32/puv3.c b/hw/unicore32/puv3.c
> index 032078f..2c17cc9 100644
> --- a/hw/unicore32/puv3.c
> +++ b/hw/unicore32/puv3.c
> @@ -93,8 +93,11 @@ static void puv3_load_kernel(const char
> *kernel_filename)
> if (kernel_filename == NULL && qtest_enabled()) {
> return;
> }
> - assert(kernel_filename != NULL);
> -
> + if (kernel_filename == NULL) {
> + error_report("No kernel found");
> + exit(1);
> + }
> +
> /* only zImage format supported */
> size = load_image_targphys(kernel_filename, KERNEL_LOAD_ADDR,
> KERNEL_MAX_SIZE);
> --
> 2.9.3
>
>