device_tree: Add info message when dumping dtb to file
PATCH 1/1 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 <[email protected]>
--- device_tree.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
device_tree.c +6 -1
@@ -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 ); } }
Signature · 1 line
2.24.1
Quoted 1 line · Leonardo Bras
error_report("%s: Failed dumping dtb to %s", __func__, dumpdtb)
Sorry, missed ending ';'.
I will send a v2.