qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] exec: file_ram_alloc report mem prealloc errors


From: Peter Lieven
Subject: [Qemu-devel] [PATCH] exec: file_ram_alloc report mem prealloc errors
Date: Thu, 14 Aug 2014 14:33:45 +0200

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

Signed-off-by: Peter Lieven <address@hidden>
---
 exec.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/exec.c b/exec.c
index 765bd94..8123186 100644
--- a/exec.c
+++ b/exec.c
@@ -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;
-- 
1.7.9.5




reply via email to

[Prev in Thread] Current Thread [Next in Thread]