diff options
Diffstat (limited to 'hw/i386')
-rw-r--r-- | hw/i386/microvm-dt.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/hw/i386/microvm-dt.c b/hw/i386/microvm-dt.c index a6a59a6e12..9c3c4995b4 100644 --- a/hw/i386/microvm-dt.c +++ b/hw/i386/microvm-dt.c @@ -336,7 +336,10 @@ void dt_setup_microvm(MicrovmMachineState *mms) if (debug) { fprintf(stderr, "%s: writing microvm.fdt\n", __func__); - g_file_set_contents("microvm.fdt", mms->fdt, size, NULL); + if (!g_file_set_contents("microvm.fdt", mms->fdt, size, NULL)) { + fprintf(stderr, "%s: writing microvm.fdt failed\n", __func__); + return; + } int ret = system("dtc -I dtb -O dts microvm.fdt"); if (ret != 0) { fprintf(stderr, "%s: oops, dtc not installed?\n", __func__); |