Skip to contentSkip to conversation

exec: file_ram_alloc report mem prealloc errors

PATCH New Peter Lieven 1 participant 1 message Aug 14, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 exec: file_ram_alloc report mem prealloc errors

if an error occurs initializing hugetables and mem prealloc is enabled qemu exits silently without dumping the error.

---
 exec.c |    4 ++++
 1 file changed, 4 insertions(+)
exec.c +4 -0
index 765bd94..8123186 100644
@@ -34,6 +34,7 @@
 #include "qemu/timer.h"
 #include "qemu/config-file.h"
 #include "qemu/error-report.h"
+#include "qapi/qmp/qerror.h"
 #include "exec/memory.h"
 #include "sysemu/dma.h"
 #include "exec/address-spaces.h"
@@ -1095,6 +1096,9 @@ static void *file_ram_alloc(RAMBlock *block,
 
 error:
     if (mem_prealloc) {
+        if (*errp) {
+            qerror_report_err(*errp);
+        }
         exit(1);
     }
     return NULL;
Signature · 1 line
1.7.9.5