#include "qapi-event.h"
#include "qmp-introspect.h"
#include "sysemu/qtest.h"
+#include "sysemu/cpus.h"
#include "qemu/cutils.h"
#include "qapi/qmp/dispatch.h"
#ifndef CONFIG_SPICE
qmp_unregister_command(&qmp_commands, "query-spice");
#endif
+#ifndef CONFIG_REPLICATION
+ qmp_unregister_command(&qmp_commands, "xen-set-replication");
+ qmp_unregister_command(&qmp_commands, "query-xen-replication-status");
+ qmp_unregister_command(&qmp_commands, "xen-colo-do-checkpoint");
+#endif
#ifndef TARGET_I386
qmp_unregister_command(&qmp_commands, "rtc-reset-reinjection");
#endif
}
goto fail;
}
- qdict_put(qdict, key, qstring_from_str(buf));
+ qdict_put_str(qdict, key, buf);
}
break;
case 'O':
size = -1;
}
}
- qdict_put(qdict, "count", qint_from_int(count));
- qdict_put(qdict, "format", qint_from_int(format));
- qdict_put(qdict, "size", qint_from_int(size));
+ qdict_put_int(qdict, "count", count);
+ qdict_put_int(qdict, "format", format);
+ qdict_put_int(qdict, "size", size);
}
break;
case 'i':
}
val <<= 20;
}
- qdict_put(qdict, key, qint_from_int(val));
+ qdict_put_int(qdict, key, val);
}
break;
case 'o':
monitor_printf(mon, "invalid size\n");
goto fail;
}
- qdict_put(qdict, key, qint_from_int(val));
+ qdict_put_int(qdict, key, val);
p = end;
}
break;
monitor_printf(mon, "Expected 'on' or 'off'\n");
goto fail;
}
- qdict_put(qdict, key, qbool_from_bool(val));
+ qdict_put_bool(qdict, key, val);
}
break;
case '-':
} else {
/* has option */
p++;
- qdict_put(qdict, key, qbool_from_bool(true));
+ qdict_put_bool(qdict, key, true);
}
}
}
cmd->name);
goto fail;
}
- qdict_put(qdict, key, qstring_from_str(p));
+ qdict_put_str(qdict, key, p);
p += len;
}
break;
QapiErrorClass_lookup[ERROR_CLASS_COMMAND_NOT_FOUND])) {
/* Provide a more useful error message */
qdict_del(qdict, "desc");
- qdict_put(qdict, "desc",
- qstring_from_str("Expecting capabilities negotiation"
- " with 'qmp_capabilities'"));
+ qdict_put_str(qdict, "desc", "Expecting capabilities negotiation"
+ " with 'qmp_capabilities'");
}
}