The API is unused since last commit. Remove it. Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> --- src/qemu/qemu_monitor.c | 13 ------------- src/qemu/qemu_monitor.h | 5 ----- src/qemu/qemu_monitor_json.c | 28 ---------------------------- src/qemu/qemu_monitor_json.h | 5 ----- tests/qemumonitorjsontest.c | 2 -- 5 files changed, 53 deletions(-) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index fa8a027aa6..23161a0088 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -3448,19 +3448,6 @@ qemuMonitorJobDismiss(qemuMonitor *mon, } -int -qemuMonitorJobCancel(qemuMonitor *mon, - const char *jobname, - bool quiet) -{ - VIR_DEBUG("jobname='%s' quiet=%d", jobname, quiet); - - QEMU_CHECK_MONITOR(mon); - - return qemuMonitorJSONJobCancel(mon, jobname, quiet); -} - - int qemuMonitorJobComplete(qemuMonitor *mon, const char *jobname) diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h index 95f1a10e31..420a85942a 100644 --- a/src/qemu/qemu_monitor.h +++ b/src/qemu/qemu_monitor.h @@ -1106,11 +1106,6 @@ int qemuMonitorJobDismiss(qemuMonitor *mon, const char *jobname) ATTRIBUTE_NONNULL(2); -int qemuMonitorJobCancel(qemuMonitor *mon, - const char *jobname, - bool quiet) - ATTRIBUTE_NONNULL(2); - int qemuMonitorJobComplete(qemuMonitor *mon, const char *jobname) ATTRIBUTE_NONNULL(2); diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index dc74c86158..8de0e4b638 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -5319,34 +5319,6 @@ qemuMonitorJSONJobDismiss(qemuMonitor *mon, } -int -qemuMonitorJSONJobCancel(qemuMonitor *mon, - const char *jobname, - bool quiet) -{ - g_autoptr(virJSONValue) cmd = NULL; - g_autoptr(virJSONValue) reply = NULL; - - if (!(cmd = qemuMonitorJSONMakeCommand("job-cancel", - "s:id", jobname, - NULL))) - return -1; - - if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0) - return -1; - - if (quiet) { - if (virJSONValueObjectHasKey(reply, "error") != 0) - return -1; - } else { - if (qemuMonitorJSONBlockJobError(cmd, reply, jobname) < 0) - return -1; - } - - return 0; -} - - int qemuMonitorJSONJobComplete(qemuMonitor *mon, const char *jobname) diff --git a/src/qemu/qemu_monitor_json.h b/src/qemu/qemu_monitor_json.h index 486ba5a593..8d8f2de479 100644 --- a/src/qemu/qemu_monitor_json.h +++ b/src/qemu/qemu_monitor_json.h @@ -348,11 +348,6 @@ int qemuMonitorJSONJobDismiss(qemuMonitor *mon, const char *jobname) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2); -int qemuMonitorJSONJobCancel(qemuMonitor *mon, - const char *jobname, - bool quiet) - ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2); - int qemuMonitorJSONJobComplete(qemuMonitor *mon, const char *jobname) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2); diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index 9e53b65289..e36036e0d2 100644 --- a/tests/qemumonitorjsontest.c +++ b/tests/qemumonitorjsontest.c @@ -1216,7 +1216,6 @@ GEN_TEST_FUNC(qemuMonitorJSONBlockdevMediumRemove, "foodev") GEN_TEST_FUNC(qemuMonitorJSONBlockdevMediumInsert, "foodev", "newnode") GEN_TEST_FUNC(qemuMonitorJSONBitmapRemove, "foodev", "newnode") GEN_TEST_FUNC(qemuMonitorJSONJobDismiss, "jobname") -GEN_TEST_FUNC(qemuMonitorJSONJobCancel, "jobname", false) GEN_TEST_FUNC(qemuMonitorJSONJobComplete, "jobname") GEN_TEST_FUNC(qemuMonitorJSONBlockJobCancel, "jobname", true) @@ -3121,7 +3120,6 @@ mymain(void) DO_TEST_GEN(qemuMonitorJSONBlockdevMediumInsert); DO_TEST_GEN(qemuMonitorJSONBitmapRemove); DO_TEST_GEN(qemuMonitorJSONJobDismiss); - DO_TEST_GEN(qemuMonitorJSONJobCancel); DO_TEST_GEN(qemuMonitorJSONJobComplete); DO_TEST_GEN(qemuMonitorJSONBlockJobCancel); DO_TEST(qemuMonitorJSONGetBalloonInfo); -- 2.30.2