All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alistair Francis <alistair23@gmail.com>
To: Bernhard Beschow <shentey@gmail.com>
Cc: QEMU Trivial <qemu-trivial@nongnu.org>,
	Alistair Francis <alistair.francis@wdc.com>,
	"qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>,
	David Gibson <david@gibson.dropbear.id.au>
Subject: Re: [PATCH] softmmu: Provide a clue as to why device tree loading failed
Date: Tue, 18 Jan 2022 08:58:41 +1000	[thread overview]
Message-ID: <CAKmqyKNN1Nb1g-j=UndSyjDPboci87y5Qs8BMj0jEbnRxxpztw@mail.gmail.com> (raw)
In-Reply-To: <20220116114649.40859-1-shentey@gmail.com>

On Sun, Jan 16, 2022 at 9:49 PM Bernhard Beschow <shentey@gmail.com> wrote:
>
> fdt_open_into() obligingly returns an error code in case the operation
> failed. So be obliging as well and use it in the error message.
>
> Signed-off-by: Bernhard Beschow <shentey@gmail.com>

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>

Alistair

> ---
>  softmmu/device_tree.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/softmmu/device_tree.c b/softmmu/device_tree.c
> index 3965c834ca..31d1066940 100644
> --- a/softmmu/device_tree.c
> +++ b/softmmu/device_tree.c
> @@ -60,7 +60,8 @@ void *create_device_tree(int *sizep)
>      }
>      ret = fdt_open_into(fdt, fdt, *sizep);
>      if (ret) {
> -        error_report("Unable to copy device tree in memory");
> +        error_report("%s: Unable to copy device tree into memory: %s",
> +                     __func__, fdt_strerror(ret));
>          exit(1);
>      }
>
> @@ -104,7 +105,8 @@ void *load_device_tree(const char *filename_path, int *sizep)
>
>      ret = fdt_open_into(fdt, fdt, dt_size);
>      if (ret) {
> -        error_report("Unable to copy device tree in memory");
> +        error_report("%s: Unable to copy device tree into memory: %s",
> +                     __func__, fdt_strerror(ret));
>          goto fail;
>      }
>
> --
> 2.34.1
>
>


  parent reply	other threads:[~2022-01-17 23:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-16 11:46 [PATCH] softmmu: Provide a clue as to why device tree loading failed Bernhard Beschow
2022-01-16 21:07 ` Philippe Mathieu-Daudé via
2022-01-17  1:16 ` David Gibson
2022-01-17 22:58 ` Alistair Francis [this message]
2022-01-18 11:34 ` Laurent Vivier

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='CAKmqyKNN1Nb1g-j=UndSyjDPboci87y5Qs8BMj0jEbnRxxpztw@mail.gmail.com' \
    --to=alistair23@gmail.com \
    --cc=alistair.francis@wdc.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=shentey@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.