mirror of
https://github.com/xemu-project/xemu.git
synced 2025-01-18 09:53:01 +00:00
device_tree: Add info message when dumping dtb to file
When dumping dtb to a file, qemu exits silently before starting the VM. Add info message so user can easily track why the proccess exits. Add error message if dtb dump failed. Signed-off-by: Leonardo Bras <leonardo@linux.ibm.com> Message-Id: <20200319040326.391090-1-leonardo@linux.ibm.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
This commit is contained in:
parent
3d0ac34603
commit
9f252c7c88
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user