diff --git a/device_tree.c b/device_tree.c index f8b46b3c73..bba6cc2164 100644 --- a/device_tree.c +++ b/device_tree.c @@ -530,7 +530,12 @@ void qemu_fdt_dumpdtb(void *fdt, int size) if (dumpdtb) { /* Dump the dtb to a file and quit */ - exit(g_file_set_contents(dumpdtb, fdt, size, NULL) ? 0 : 1); + if (g_file_set_contents(dumpdtb, fdt, size, NULL)) { + info_report("dtb dumped to %s. Exiting.", dumpdtb); + exit(0); + } + error_report("%s: Failed dumping dtb to %s", __func__, dumpdtb); + exit(1); } }