Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx> --- src/qemu/qemu_monitor.c | 13 +++++++++++++ src/qemu/qemu_monitor.h | 3 +++ src/qemu/qemu_monitor_json.c | 27 +++++++++++++++++++++++++++ src/qemu/qemu_monitor_json.h | 4 ++++ 4 files changed, 47 insertions(+) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index 64efb89e8..5ca3cdce2 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -4254,6 +4254,19 @@ qemuMonitorMigrateStartPostCopy(qemuMonitorPtr mon) return qemuMonitorJSONMigrateStartPostCopy(mon); } + +int +qemuMonitorMigrateContinue(qemuMonitorPtr mon, + qemuMonitorMigrationStatus status) +{ + VIR_DEBUG("status=%s", qemuMonitorMigrationStatusTypeToString(status)); + + QEMU_CHECK_MONITOR_JSON(mon); + + return qemuMonitorJSONMigrateContinue(mon, status); +} + + int qemuMonitorGetRTCTime(qemuMonitorPtr mon, struct tm *tm) diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h index 1e6b97714..fe29f484e 100644 --- a/src/qemu/qemu_monitor.h +++ b/src/qemu/qemu_monitor.h @@ -1119,6 +1119,9 @@ int qemuMonitorMigrateIncoming(qemuMonitorPtr mon, int qemuMonitorMigrateStartPostCopy(qemuMonitorPtr mon); +int qemuMonitorMigrateContinue(qemuMonitorPtr mon, + qemuMonitorMigrationStatus status); + int qemuMonitorGetRTCTime(qemuMonitorPtr mon, struct tm *tm); diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index f7567eb77..def80882c 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -7374,6 +7374,33 @@ qemuMonitorJSONMigrateStartPostCopy(qemuMonitorPtr mon) return ret; } + +int +qemuMonitorJSONMigrateContinue(qemuMonitorPtr mon, + qemuMonitorMigrationStatus status) +{ + const char *statusStr = qemuMonitorMigrationStatusTypeToString(status); + int ret = -1; + virJSONValuePtr cmd; + virJSONValuePtr reply = NULL; + + if (!(cmd = qemuMonitorJSONMakeCommand("migrate-continue", + "s:state", statusStr, + NULL))) + return -1; + + if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0) + goto cleanup; + + ret = qemuMonitorJSONCheckError(cmd, reply); + + cleanup: + virJSONValueFree(cmd); + virJSONValueFree(reply); + return ret; +} + + int qemuMonitorJSONGetRTCTime(qemuMonitorPtr mon, struct tm *tm) diff --git a/src/qemu/qemu_monitor_json.h b/src/qemu/qemu_monitor_json.h index b17348a11..739a99293 100644 --- a/src/qemu/qemu_monitor_json.h +++ b/src/qemu/qemu_monitor_json.h @@ -500,6 +500,10 @@ int qemuMonitorJSONMigrateIncoming(qemuMonitorPtr mon, int qemuMonitorJSONMigrateStartPostCopy(qemuMonitorPtr mon) ATTRIBUTE_NONNULL(1); +int qemuMonitorJSONMigrateContinue(qemuMonitorPtr mon, + qemuMonitorMigrationStatus status) + ATTRIBUTE_NONNULL(1); + int qemuMonitorJSONGetRTCTime(qemuMonitorPtr mon, struct tm *tm) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2); -- 2.14.2 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list