From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42522) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHuEH-0003I3-RG for qemu-devel@nongnu.org; Thu, 14 Aug 2014 08:34:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XHuEC-0007g3-3I for qemu-devel@nongnu.org; Thu, 14 Aug 2014 08:34:05 -0400 Received: from mx-v6.kamp.de ([2a02:248:0:51::16]:37653 helo=mx01.kamp.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHuEB-0007f6-O2 for qemu-devel@nongnu.org; Thu, 14 Aug 2014 08:34:00 -0400 From: Peter Lieven Date: Thu, 14 Aug 2014 14:33:45 +0200 Message-Id: <1408019625-10799-1-git-send-email-pl@kamp.de> Subject: [Qemu-devel] [PATCH] exec: file_ram_alloc report mem prealloc errors List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: pbonzini@redhat.com, Peter Lieven if an error occurs initializing hugetables and mem prealloc is enabled qemu exits silently without dumping the error. Signed-off-by: Peter Lieven --- 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