qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH 3/4] memory: Do not print empty PIO root


From: Avi Kivity
Subject: [Qemu-devel] [PATCH 3/4] memory: Do not print empty PIO root
Date: Sun, 2 Oct 2011 16:32:18 +0200

From: Jan Kiszka <address@hidden>

Signed-off-by: Jan Kiszka <address@hidden>
Signed-off-by: Avi Kivity <address@hidden>
---
 memory.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/memory.c b/memory.c
index eae67be..19f1d36 100644
--- a/memory.c
+++ b/memory.c
@@ -1360,7 +1360,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.6.3




reply via email to

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