qemu: monitor: Remove unused arguments of qemuMonitorBlockStream

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2022-07-20 12:39:43 +02:00
parent cd3aa2058d
commit d926d7b4c9
6 changed files with 6 additions and 29 deletions

View File

@ -14493,8 +14493,6 @@ qemuDomainBlockPullCommon(virDomainObj *vm,
ret = qemuMonitorBlockStream(priv->mon,
disk->src->nodeformat,
job->name,
true,
NULL,
nodebase,
backingPath,
speed);

View File

@ -2966,26 +2966,17 @@ int
qemuMonitorBlockStream(qemuMonitor *mon,
const char *device,
const char *jobname,
bool persistjob,
const char *base,
const char *baseNode,
const char *backingName,
unsigned long long bandwidth)
{
VIR_DEBUG("device=%s, jobname=%s, persistjob=%d, base=%s, baseNode=%s, "
"backingName=%s, bandwidth=%lluB",
device, NULLSTR(jobname), persistjob, NULLSTR(base),
VIR_DEBUG("device=%s, jobname=%s, baseNode=%s, backingName=%s, bandwidth=%lluB",
device, NULLSTR(jobname),
NULLSTR(baseNode), NULLSTR(backingName), bandwidth);
QEMU_CHECK_MONITOR(mon);
if (base && baseNode) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("'base' and 'baseNode' can't be used together"));
return -1;
}
return qemuMonitorJSONBlockStream(mon, device, jobname, persistjob, base,
return qemuMonitorJSONBlockStream(mon, device, jobname,
baseNode, backingName, bandwidth);
}

View File

@ -1025,8 +1025,6 @@ int qemuMonitorSendKey(qemuMonitor *mon,
int qemuMonitorBlockStream(qemuMonitor *mon,
const char *device,
const char *jobname,
bool persistjob,
const char *base,
const char *baseNode,
const char *backingName,
unsigned long long bandwidth)

View File

@ -4503,27 +4503,19 @@ int
qemuMonitorJSONBlockStream(qemuMonitor *mon,
const char *device,
const char *jobname,
bool persistjob,
const char *base,
const char *baseNode,
const char *backingName,
unsigned long long speed)
{
g_autoptr(virJSONValue) cmd = NULL;
g_autoptr(virJSONValue) reply = NULL;
virTristateBool autofinalize = VIR_TRISTATE_BOOL_ABSENT;
virTristateBool autodismiss = VIR_TRISTATE_BOOL_ABSENT;
if (persistjob) {
autofinalize = VIR_TRISTATE_BOOL_YES;
autodismiss = VIR_TRISTATE_BOOL_NO;
}
virTristateBool autofinalize = VIR_TRISTATE_BOOL_YES;
virTristateBool autodismiss = VIR_TRISTATE_BOOL_NO;
if (!(cmd = qemuMonitorJSONMakeCommand("block-stream",
"s:device", device,
"S:job-id", jobname,
"Y:speed", speed,
"S:base", base,
"S:base-node", baseNode,
"S:backing-file", backingName,
"T:auto-finalize", autofinalize,

View File

@ -366,8 +366,6 @@ int
qemuMonitorJSONBlockStream(qemuMonitor *mon,
const char *device,
const char *jobname,
bool persistjob,
const char *base,
const char *baseNode,
const char *backingName,
unsigned long long speed)

View File

@ -1214,7 +1214,7 @@ GEN_TEST_FUNC(qemuMonitorJSONGraphicsRelocate, VIR_DOMAIN_GRAPHICS_TYPE_SPICE,
GEN_TEST_FUNC(qemuMonitorJSONRemoveNetdev, "net0")
GEN_TEST_FUNC(qemuMonitorJSONDelDevice, "ide0")
GEN_TEST_FUNC(qemuMonitorJSONBlockdevMirror, "jobname", true, "vdb", "targetnode", 1024, 1234, 31234, true, true)
GEN_TEST_FUNC(qemuMonitorJSONBlockStream, "vdb", "jobname", true, "/foo/bar1", "backingnode", "backingfilename", 1024)
GEN_TEST_FUNC(qemuMonitorJSONBlockStream, "vdb", "jobname", "backingnode", "backingfilename", 1024)
GEN_TEST_FUNC(qemuMonitorJSONBlockCommit, "vdb", "jobname", "topnode", "basenode", "backingfilename", 1024)
GEN_TEST_FUNC(qemuMonitorJSONDrivePivot, "vdb")
GEN_TEST_FUNC(qemuMonitorJSONScreendump, "devicename", 1, "/foo/bar")