qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Changbin Du <changbin.du@huawei.com>,
	Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-arm@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [PATCH v3] hw/arm/boot: Report error msg if loading elf/dtb failed
Date: Tue, 3 Sep 2024 15:52:31 +0200	[thread overview]
Message-ID: <cceb62dd-742c-471b-8b4c-6bfc304d4565@linaro.org> (raw)
In-Reply-To: <20240903133940.3447430-1-changbin.du@huawei.com>

On 3/9/24 15:39, Changbin Du wrote:
> Print errors before exit. Do not exit silently.
> 
> Cc: Philippe Mathieu-Daudé <philmd@linaro.org>
> Signed-off-by: Changbin Du <changbin.du@huawei.com>
> 
> ---
> v3: use load_elf_strerror() to format errno.
> v2: remove msg for arm_load_dtb.
> ---
>   hw/arm/boot.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/hw/arm/boot.c b/hw/arm/boot.c
> index d480a7da02cf..6c895e05cbc0 100644
> --- a/hw/arm/boot.c
> +++ b/hw/arm/boot.c
> @@ -839,6 +839,8 @@ static ssize_t arm_load_elf(struct arm_boot_info *info, uint64_t *pentry,
>                         1, data_swab, as);
>       if (ret <= 0) {
>           /* The header loaded but the image didn't */
> +        error_report("Couldn't load elf '%s': %s",
> +                     info->kernel_filename, load_elf_strerror(ret));
>           exit(1);
>       }
>   

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>

Thanks!


  reply	other threads:[~2024-09-03 14:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-03 13:39 [PATCH v3] hw/arm/boot: Report error msg if loading elf/dtb failed Changbin Du via
2024-09-03 13:52 ` Philippe Mathieu-Daudé [this message]
2024-09-03 16:38   ` Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cceb62dd-742c-471b-8b4c-6bfc304d4565@linaro.org \
    --to=philmd@linaro.org \
    --cc=changbin.du@huawei.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).