Received: from eggs.gnu.org ([140.186.70.92]:56964) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R8XH8-0004sk-KV for qemu-devel@nongnu.org; Tue, 27 Sep 2011 09:00:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R8XH7-0000oF-LH for qemu-devel@nongnu.org; Tue, 27 Sep 2011 09:00:42 -0400 Received: from thoth.sbs.de ([192.35.17.2]:22367) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R8XH7-0000o4-A9 for qemu-devel@nongnu.org; Tue, 27 Sep 2011 09:00:41 -0400 Message-ID: <4E81C8F6.2060502@siemens.com> Date: Tue, 27 Sep 2011 15:00:38 +0200 From: Jan Kiszka MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH 2/3] memory: Do not print empty PIO root List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: Blue Swirl , qemu-devel Signed-off-by: Jan Kiszka --- memory.c | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/memory.c b/memory.c index 4c190e5..24c5abd 100644 --- a/memory.c +++ b/memory.c @@ -1414,7 +1414,10 @@ void mtree_info(fprintf_function mon_printf, void *f) g_free(ml2); } - QTAILQ_INIT(&ml_head); - mon_printf(f, "I/O\n"); - mtree_print_mr(mon_printf, f, address_space_io.root, 0, 0, &ml_head); + if (address_space_io.root && + !QTAILQ_EMPTY(&address_space_io.root->subregions)) { + QTAILQ_INIT(&ml_head); + mon_printf(f, "I/O\n"); + mtree_print_mr(mon_printf, f, address_space_io.root, 0, 0, &ml_head); + } } -- 1.7.3.4