The 'persistjob' is always true and 'top' and 'base' are always NULL. Adjust the functions to drop the arguments. Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> --- src/qemu/qemu_driver.c | 3 --- src/qemu/qemu_monitor.c | 15 +++++---------- src/qemu/qemu_monitor.h | 3 --- src/qemu/qemu_monitor_json.c | 14 ++------------ src/qemu/qemu_monitor_json.h | 3 --- tests/qemumonitorjsontest.c | 2 +- 6 files changed, 8 insertions(+), 32 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index e8dc524186..ac20d04353 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -15637,10 +15637,7 @@ qemuDomainBlockCommit(virDomainPtr dom, ret = qemuMonitorBlockCommit(priv->mon, qemuDomainDiskGetTopNodename(disk), job->name, - true, - NULL, topSource->nodeformat, - NULL, baseSource->nodeformat, backingPath, speed); diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index 9c24b842bd..1453181f94 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -2913,24 +2913,19 @@ int qemuMonitorBlockCommit(qemuMonitor *mon, const char *device, const char *jobname, - bool persistjob, - const char *top, const char *topNode, - const char *base, const char *baseNode, const char *backingName, unsigned long long bandwidth) { - VIR_DEBUG("device=%s, jobname=%s, persistjob=%d, top=%s, topNode=%s, " - "base=%s, baseNode=%s, backingName=%s, bandwidth=%llu", - device, NULLSTR(jobname), persistjob, NULLSTR(top), NULLSTR(topNode), - NULLSTR(base), NULLSTR(baseNode), NULLSTR(backingName), bandwidth); + VIR_DEBUG("device=%s, jobname=%s, topNode=%s, baseNode=%s, backingName=%s, bandwidth=%llu", + device, NULLSTR(jobname), NULLSTR(topNode), + NULLSTR(baseNode), NULLSTR(backingName), bandwidth); QEMU_CHECK_MONITOR(mon); - return qemuMonitorJSONBlockCommit(mon, device, jobname, persistjob, top, - topNode, base, baseNode, backingName, - bandwidth); + return qemuMonitorJSONBlockCommit(mon, device, jobname, topNode, baseNode, + backingName, bandwidth); } diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h index aee9ca0e6a..7aed4ffd4f 100644 --- a/src/qemu/qemu_monitor.h +++ b/src/qemu/qemu_monitor.h @@ -997,10 +997,7 @@ int qemuMonitorDrivePivot(qemuMonitor *mon, int qemuMonitorBlockCommit(qemuMonitor *mon, const char *device, const char *jobname, - bool persistjob, - const char *top, const char *topNode, - const char *base, const char *baseNode, const char *backingName, unsigned long long bandwidth) diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index bd3130075b..e6eb41d85b 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -4176,31 +4176,21 @@ int qemuMonitorJSONBlockCommit(qemuMonitor *mon, const char *device, const char *jobname, - bool persistjob, - const char *top, const char *topNode, - 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; cmd = qemuMonitorJSONMakeCommand("block-commit", "s:device", device, "S:job-id", jobname, "Y:speed", speed, - "S:top", top, "S:top-node", topNode, - "S:base", base, "S:base-node", baseNode, "S:backing-file", backingName, "T:auto-finalize", autofinalize, diff --git a/src/qemu/qemu_monitor_json.h b/src/qemu/qemu_monitor_json.h index f409480c0b..9da26ca646 100644 --- a/src/qemu/qemu_monitor_json.h +++ b/src/qemu/qemu_monitor_json.h @@ -328,10 +328,7 @@ int qemuMonitorJSONBlockCommit(qemuMonitor *mon, const char *device, const char *jobname, - bool persistjob, - const char *top, const char *topNode, - const char *base, const char *baseNode, const char *backingName, unsigned long long bandwidth) diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index 265fa0b705..d5915720c8 100644 --- a/tests/qemumonitorjsontest.c +++ b/tests/qemumonitorjsontest.c @@ -1215,7 +1215,7 @@ 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(qemuMonitorJSONBlockCommit, "vdb", "jobname", true, "/foo/bar1", "topnode", "/foo/bar2", "basenode", "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") GEN_TEST_FUNC(qemuMonitorJSONOpenGraphics, "spice", "spicefd", false) -- 2.36.1