qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] softmmu: Provide a clue as to why device tree loading failed
@ 2022-01-16 11:46 Bernhard Beschow
  2022-01-16 21:07 ` Philippe Mathieu-Daudé via
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Bernhard Beschow @ 2022-01-16 11:46 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, Alistair Francis, Bernhard Beschow, David Gibson

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>
---
 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



^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-01-18 11:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2022-01-18 11:34 ` Laurent Vivier

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).