mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-21 20:15:17 +00:00
qemu: Clean up old leftovers in qemuMonitorDrivePivot
There are two leftover unused variables. Remove them and clean up the fallout of the change.
This commit is contained in:
parent
3eab2f647a
commit
db37f3cc3a
@ -16044,7 +16044,6 @@ qemuDomainBlockPivot(virConnectPtr conn,
|
||||
int ret = -1, rc;
|
||||
qemuDomainObjPrivatePtr priv = vm->privateData;
|
||||
virDomainBlockJobInfo info;
|
||||
const char *format = NULL;
|
||||
bool resume = false;
|
||||
virStorageSourcePtr oldsrc = NULL;
|
||||
virQEMUDriverConfigPtr cfg = virQEMUDriverGetConfig(driver);
|
||||
@ -16056,8 +16055,6 @@ qemuDomainBlockPivot(virConnectPtr conn,
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
format = virStorageFileFormatTypeToString(disk->mirror->format);
|
||||
|
||||
/* Probe the status, if needed. */
|
||||
if (!disk->mirrorState) {
|
||||
qemuDomainObjEnterMonitor(driver, vm);
|
||||
@ -16141,7 +16138,7 @@ qemuDomainBlockPivot(virConnectPtr conn,
|
||||
* overall return value. */
|
||||
disk->mirrorState = VIR_DOMAIN_DISK_MIRROR_STATE_PIVOT;
|
||||
qemuDomainObjEnterMonitor(driver, vm);
|
||||
ret = qemuMonitorDrivePivot(priv->mon, device, disk->mirror->path, format);
|
||||
ret = qemuMonitorDrivePivot(priv->mon, device);
|
||||
if (qemuDomainObjExitMonitor(driver, vm) < 0) {
|
||||
ret = -1;
|
||||
goto cleanup;
|
||||
|
@ -3492,23 +3492,20 @@ qemuMonitorDiskNameLookup(qemuMonitorPtr mon,
|
||||
}
|
||||
|
||||
|
||||
/* Use the block-job-complete monitor command to pivot a block copy
|
||||
* job. */
|
||||
/* Use the block-job-complete monitor command to pivot a block copy job. */
|
||||
int
|
||||
qemuMonitorDrivePivot(qemuMonitorPtr mon, const char *device,
|
||||
const char *file, const char *format)
|
||||
qemuMonitorDrivePivot(qemuMonitorPtr mon,
|
||||
const char *device)
|
||||
{
|
||||
int ret = -1;
|
||||
VIR_DEBUG("mon=%p, device=%s", mon, device);
|
||||
|
||||
VIR_DEBUG("mon=%p, device=%s, file=%s, format=%s",
|
||||
mon, device, file, NULLSTR(format));
|
||||
|
||||
if (mon->json)
|
||||
ret = qemuMonitorJSONDrivePivot(mon, device, file, format);
|
||||
else
|
||||
if (!mon->json) {
|
||||
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
|
||||
_("drive pivot requires JSON monitor"));
|
||||
return ret;
|
||||
return -1;
|
||||
}
|
||||
|
||||
return qemuMonitorJSONDrivePivot(mon, device);
|
||||
}
|
||||
|
||||
int qemuMonitorArbitraryCommand(qemuMonitorPtr mon,
|
||||
|
@ -721,10 +721,8 @@ int qemuMonitorDriveMirror(qemuMonitorPtr mon,
|
||||
unsigned int flags)
|
||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3);
|
||||
int qemuMonitorDrivePivot(qemuMonitorPtr mon,
|
||||
const char *device,
|
||||
const char *file,
|
||||
const char *format)
|
||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3);
|
||||
const char *device)
|
||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
|
||||
|
||||
int qemuMonitorBlockCommit(qemuMonitorPtr mon,
|
||||
const char *device,
|
||||
|
@ -3859,9 +3859,8 @@ qemuMonitorJSONBlockCommit(qemuMonitorPtr mon, const char *device,
|
||||
}
|
||||
|
||||
int
|
||||
qemuMonitorJSONDrivePivot(qemuMonitorPtr mon, const char *device,
|
||||
const char *file ATTRIBUTE_UNUSED,
|
||||
const char *format ATTRIBUTE_UNUSED)
|
||||
qemuMonitorJSONDrivePivot(qemuMonitorPtr mon,
|
||||
const char *device)
|
||||
{
|
||||
int ret;
|
||||
virJSONValuePtr cmd;
|
||||
|
@ -264,9 +264,7 @@ int qemuMonitorJSONDriveMirror(qemuMonitorPtr mon,
|
||||
unsigned int flags)
|
||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3);
|
||||
int qemuMonitorJSONDrivePivot(qemuMonitorPtr mon,
|
||||
const char *device,
|
||||
const char *file,
|
||||
const char *format)
|
||||
const char *device)
|
||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
|
||||
|
||||
int qemuMonitorJSONBlockCommit(qemuMonitorPtr mon,
|
||||
|
@ -1186,7 +1186,7 @@ GEN_TEST_FUNC(qemuMonitorJSONSetDrivePassphrase, "vda", "secret_passhprase")
|
||||
GEN_TEST_FUNC(qemuMonitorJSONDriveMirror, "vdb", "/foo/bar", NULL, 1024, 0, 0,
|
||||
VIR_DOMAIN_BLOCK_REBASE_SHALLOW | VIR_DOMAIN_BLOCK_REBASE_REUSE_EXT)
|
||||
GEN_TEST_FUNC(qemuMonitorJSONBlockCommit, "vdb", "/foo/bar1", "/foo/bar2", NULL, 1024)
|
||||
GEN_TEST_FUNC(qemuMonitorJSONDrivePivot, "vdb", NULL, NULL)
|
||||
GEN_TEST_FUNC(qemuMonitorJSONDrivePivot, "vdb")
|
||||
GEN_TEST_FUNC(qemuMonitorJSONScreendump, "/foo/bar")
|
||||
GEN_TEST_FUNC(qemuMonitorJSONOpenGraphics, "spice", "spicefd", false)
|
||||
GEN_TEST_FUNC(qemuMonitorJSONNBDServerStart, "localhost", 12345)
|
||||
|
Loading…
x
Reference in New Issue
Block a user