From: Peter Maydell <peter.maydell@linaro.org>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>
Cc: Changbin Du <changbin.du@huawei.com>,
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 17:38:30 +0100 [thread overview]
Message-ID: <CAFEAcA-7FjL0SZzJsJ6WZ-Cccx8W2711_CrkNpknrJgYtJx=iQ@mail.gmail.com> (raw)
In-Reply-To: <cceb62dd-742c-471b-8b4c-6bfc304d4565@linaro.org>
On Tue, 3 Sept 2024 at 14:52, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>
> 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>
Applied to target-arm.next, thanks.
-- PMM
prev parent reply other threads:[~2024-09-03 16:39 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é
2024-09-03 16:38 ` Peter Maydell [this message]
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='CAFEAcA-7FjL0SZzJsJ6WZ-Cccx8W2711_CrkNpknrJgYtJx=iQ@mail.gmail.com' \
--to=peter.maydell@linaro.org \
--cc=changbin.du@huawei.com \
--cc=philmd@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).