mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 03:12:22 +00:00
qemu: monitor: Move qemuMonitorJSONDrivePivot together with block-job APIs
Move all relevant APIs dealing with existing jobs together. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
parent
7cead0af6a
commit
e94a4053dc
@ -4423,33 +4423,6 @@ qemuMonitorJSONBlockCommit(qemuMonitorPtr mon, const char *device,
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
qemuMonitorJSONDrivePivot(qemuMonitorPtr mon,
|
||||
const char *device)
|
||||
{
|
||||
int ret = -1;
|
||||
virJSONValuePtr cmd;
|
||||
virJSONValuePtr reply = NULL;
|
||||
|
||||
cmd = qemuMonitorJSONMakeCommand("block-job-complete",
|
||||
"s:device", device,
|
||||
NULL);
|
||||
if (!cmd)
|
||||
return -1;
|
||||
|
||||
if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (qemuMonitorJSONCheckError(cmd, reply) < 0)
|
||||
goto cleanup;
|
||||
|
||||
ret = 0;
|
||||
cleanup:
|
||||
virJSONValueFree(cmd);
|
||||
virJSONValueFree(reply);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
static char *
|
||||
qemuMonitorJSONDiskNameLookupOne(virJSONValuePtr image,
|
||||
@ -4903,6 +4876,34 @@ qemuMonitorJSONBlockJobSetSpeed(qemuMonitorPtr mon,
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
qemuMonitorJSONDrivePivot(qemuMonitorPtr mon,
|
||||
const char *device)
|
||||
{
|
||||
int ret = -1;
|
||||
virJSONValuePtr cmd;
|
||||
virJSONValuePtr reply = NULL;
|
||||
|
||||
cmd = qemuMonitorJSONMakeCommand("block-job-complete",
|
||||
"s:device", device,
|
||||
NULL);
|
||||
if (!cmd)
|
||||
return -1;
|
||||
|
||||
if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (qemuMonitorJSONCheckError(cmd, reply) < 0)
|
||||
goto cleanup;
|
||||
|
||||
ret = 0;
|
||||
cleanup:
|
||||
virJSONValueFree(cmd);
|
||||
virJSONValueFree(reply);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
int qemuMonitorJSONOpenGraphics(qemuMonitorPtr mon,
|
||||
const char *protocol,
|
||||
const char *fdname,
|
||||
|
Loading…
x
Reference in New Issue
Block a user