提交 93d56e9d 编写于 作者: J Jiri Denemark

qemu: Add APIs for migrate-incoming QMP command

Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
上级 04c721f2
......@@ -3811,3 +3811,15 @@ qemuMonitorGetMemoryDeviceInfo(qemuMonitorPtr mon,
return ret;
}
int
qemuMonitorMigrateIncoming(qemuMonitorPtr mon,
const char *uri)
{
VIR_DEBUG("uri=%s", uri);
QEMU_CHECK_MONITOR_JSON(mon);
return qemuMonitorJSONMigrateIncoming(mon, uri);
}
......@@ -924,6 +924,9 @@ int qemuMonitorGetMemoryDeviceInfo(qemuMonitorPtr mon,
virHashTablePtr *info)
ATTRIBUTE_NONNULL(2);
int qemuMonitorMigrateIncoming(qemuMonitorPtr mon,
const char *uri);
/**
* When running two dd process and using <> redirection, we need a
* shell that will not truncate files. These two strings serve that
......
......@@ -6627,3 +6627,28 @@ qemuMonitorJSONFindLinkPath(qemuMonitorPtr mon,
VIR_FREE(linkname);
return ret;
}
int
qemuMonitorJSONMigrateIncoming(qemuMonitorPtr mon,
const char *uri)
{
int ret = -1;
virJSONValuePtr cmd;
virJSONValuePtr reply = NULL;
if (!(cmd = qemuMonitorJSONMakeCommand("migrate-incoming",
"s:uri", uri,
NULL)))
return -1;
if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0)
goto cleanup;
ret = qemuMonitorJSONCheckError(cmd, reply);
cleanup:
virJSONValueFree(cmd);
virJSONValueFree(reply);
return ret;
}
......@@ -480,4 +480,9 @@ int qemuMonitorJSONFindLinkPath(qemuMonitorPtr mon,
const char *name,
char **path)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3);
int qemuMonitorJSONMigrateIncoming(qemuMonitorPtr mon,
const char *uri)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
#endif /* QEMU_MONITOR_JSON_H */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册