+ QDict *qdict;
+
+ qdict = qobject_to_qdict(data);
+
+ monitor_printf(mon, "Migration status: %s\n",
+ qdict_get_str(qdict, "status"));
+
+ if (qdict_haskey(qdict, "ram")) {
+ migrate_print_status(mon, "ram", qdict);
+ }
+
+ if (qdict_haskey(qdict, "disk")) {
+ migrate_print_status(mon, "disk", qdict);
+ }
+}
+
+static void migrate_put_status(QDict *qdict, const char *name,
+ uint64_t trans, uint64_t rem, uint64_t total)
+{
+ QObject *obj;
+
+ obj = qobject_from_jsonf("{ 'transferred': %" PRId64 ", "
+ "'remaining': %" PRId64 ", "
+ "'total': %" PRId64 " }", trans, rem, total);
+ qdict_put_obj(qdict, name, obj);
+}
+
+void do_info_migrate(Monitor *mon, QObject **ret_data)
+{
+ QDict *qdict;