aboutsummaryrefslogtreecommitdiff
path: root/hmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'hmp.c')
-rw-r--r--hmp.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/hmp.c b/hmp.c
index 559cad1bb5..0cf5baa069 100644
--- a/hmp.c
+++ b/hmp.c
@@ -1983,15 +1983,14 @@ void hmp_info_memdev(Monitor *mon, const QDict *qdict)
Error *err = NULL;
MemdevList *memdev_list = qmp_query_memdev(&err);
MemdevList *m = memdev_list;
- StringOutputVisitor *ov;
+ Visitor *v;
char *str;
int i = 0;
while (m) {
- ov = string_output_visitor_new(false);
- visit_type_uint16List(string_output_get_visitor(ov), NULL,
- &m->value->host_nodes, NULL);
+ v = string_output_visitor_new(false, &str);
+ visit_type_uint16List(v, NULL, &m->value->host_nodes, NULL);
monitor_printf(mon, "memory backend: %d\n", i);
monitor_printf(mon, " size: %" PRId64 "\n", m->value->size);
monitor_printf(mon, " merge: %s\n",
@@ -2002,11 +2001,11 @@ void hmp_info_memdev(Monitor *mon, const QDict *qdict)
m->value->prealloc ? "true" : "false");
monitor_printf(mon, " policy: %s\n",
HostMemPolicy_lookup[m->value->policy]);
- str = string_output_get_string(ov);
+ visit_complete(v, &str);
monitor_printf(mon, " host nodes: %s\n", str);
g_free(str);
- visit_free(string_output_get_visitor(ov));
+ visit_free(v);
m = m->next;
i++;
}