From 788d6376daa0e9f1c1a0b48b629b0d6c6ccba055 Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Tue, 22 May 2018 13:46:05 +0200 Subject: [PATCH] qemu: monitor: Drop JSON versions of savevm/delvm/loadvm MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit qemu did not QAPIfy these and the design and name will most probably change. The replacements will not be compatible. Drop the JSON stubs and annotate that there won't be a replacement. Signed-off-by: Peter Krempa Reviewed-by: Ján Tomko --- src/qemu/qemu_monitor.c | 18 ++++++------------ src/qemu/qemu_monitor_json.c | 21 --------------------- src/qemu/qemu_monitor_json.h | 4 ---- 3 files changed, 6 insertions(+), 37 deletions(-) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index ea82d7dba4..0b1f08efee 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -3218,10 +3218,8 @@ qemuMonitorCreateSnapshot(qemuMonitorPtr mon, const char *name) QEMU_CHECK_MONITOR(mon); - if (mon->json) - return qemuMonitorJSONCreateSnapshot(mon, name); - else - return qemuMonitorTextCreateSnapshot(mon, name); + /* there won't ever be a direct QMP replacement for this function */ + return qemuMonitorTextCreateSnapshot(mon, name); } int @@ -3231,10 +3229,8 @@ qemuMonitorLoadSnapshot(qemuMonitorPtr mon, const char *name) QEMU_CHECK_MONITOR(mon); - if (mon->json) - return qemuMonitorJSONLoadSnapshot(mon, name); - else - return qemuMonitorTextLoadSnapshot(mon, name); + /* there won't ever be a direct QMP replacement for this function */ + return qemuMonitorTextLoadSnapshot(mon, name); } @@ -3245,10 +3241,8 @@ qemuMonitorDeleteSnapshot(qemuMonitorPtr mon, const char *name) QEMU_CHECK_MONITOR(mon); - if (mon->json) - return qemuMonitorJSONDeleteSnapshot(mon, name); - else - return qemuMonitorTextDeleteSnapshot(mon, name); + /* there won't ever be a direct QMP replacement for this function */ + return qemuMonitorTextDeleteSnapshot(mon, name); } diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 9916e78aa4..9f5c358795 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -4090,27 +4090,6 @@ int qemuMonitorJSONSetDrivePassphrase(qemuMonitorPtr mon, return ret; } -int qemuMonitorJSONCreateSnapshot(qemuMonitorPtr mon, const char *name) -{ - /* XXX Update to use QMP, if QMP ever adds support for savevm */ - VIR_DEBUG("savevm command not found, trying HMP"); - return qemuMonitorTextCreateSnapshot(mon, name); -} - -int qemuMonitorJSONLoadSnapshot(qemuMonitorPtr mon, const char *name) -{ - /* XXX Update to use QMP, if QMP ever adds support for loadvm */ - VIR_DEBUG("loadvm command not found, trying HMP"); - return qemuMonitorTextLoadSnapshot(mon, name); -} - -int qemuMonitorJSONDeleteSnapshot(qemuMonitorPtr mon, const char *name) -{ - /* XXX Update to use QMP, if QMP ever adds support for delvm */ - VIR_DEBUG("delvm command not found, trying HMP"); - return qemuMonitorTextDeleteSnapshot(mon, name); -} - int qemuMonitorJSONDiskSnapshot(qemuMonitorPtr mon, virJSONValuePtr actions, const char *device, const char *file, diff --git a/src/qemu/qemu_monitor_json.h b/src/qemu/qemu_monitor_json.h index 646cfcc8ac..f4ac8319ac 100644 --- a/src/qemu/qemu_monitor_json.h +++ b/src/qemu/qemu_monitor_json.h @@ -241,10 +241,6 @@ int qemuMonitorJSONSetDrivePassphrase(qemuMonitorPtr mon, const char *alias, const char *passphrase); -int qemuMonitorJSONCreateSnapshot(qemuMonitorPtr mon, const char *name); -int qemuMonitorJSONLoadSnapshot(qemuMonitorPtr mon, const char *name); -int qemuMonitorJSONDeleteSnapshot(qemuMonitorPtr mon, const char *name); - int qemuMonitorJSONDiskSnapshot(qemuMonitorPtr mon, virJSONValuePtr actions, const char *device, -- GitLab