The QEMU "change" QMP command interface is being deprecated according to qapi-schema.json, so this patch will keep the current API available for legacy/older QEMU binaries with a future patch introducing the newer change-vnc-password QMP command interface. Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx> --- src/qemu/qemu_hotplug.c | 2 +- src/qemu/qemu_monitor.c | 6 +++--- src/qemu/qemu_monitor.h | 4 ++-- src/qemu/qemu_monitor_json.c | 6 ++++-- src/qemu/qemu_monitor_json.h | 4 ++-- tests/qemumonitorjsontest.c | 4 ++-- 6 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index e0a5300f0..0ee9b2bfc 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -5341,7 +5341,7 @@ qemuDomainChangeGraphicsPasswords(virQEMUDriverPtr driver, _("Graphics password only supported for VNC")); ret = -1; } else { - ret = qemuMonitorSetVNCPassword(priv->mon, password); + ret = qemuMonitorSetVNCPasswordLegacy(priv->mon, password); } } if (ret != 0) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index 1d67a9778..56c8345d5 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -2370,8 +2370,8 @@ qemuMonitorBlockResize(qemuMonitorPtr mon, int -qemuMonitorSetVNCPassword(qemuMonitorPtr mon, - const char *password) +qemuMonitorSetVNCPasswordLegacy(qemuMonitorPtr mon, + const char *password) { VIR_DEBUG("password=%p", password); @@ -2381,7 +2381,7 @@ qemuMonitorSetVNCPassword(qemuMonitorPtr mon, password = ""; if (mon->json) - return qemuMonitorJSONSetVNCPassword(mon, password); + return qemuMonitorJSONSetVNCPasswordLegacy(mon, password); else return qemuMonitorTextSetVNCPassword(mon, password); } diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h index adfa87aba..cf9ab7cb3 100644 --- a/src/qemu/qemu_monitor.h +++ b/src/qemu/qemu_monitor.h @@ -595,8 +595,8 @@ int qemuMonitorBlockStatsUpdateCapacity(qemuMonitorPtr mon, int qemuMonitorBlockResize(qemuMonitorPtr mon, const char *dev_name, unsigned long long size); -int qemuMonitorSetVNCPassword(qemuMonitorPtr mon, - const char *password); +int qemuMonitorSetVNCPasswordLegacy(qemuMonitorPtr mon, + const char *password); int qemuMonitorSetPassword(qemuMonitorPtr mon, int type, const char *password, diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 08dfffdf6..ad81b70db 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -2356,8 +2356,10 @@ int qemuMonitorJSONBlockResize(qemuMonitorPtr mon, return ret; } -int qemuMonitorJSONSetVNCPassword(qemuMonitorPtr mon, - const char *password) + +int +qemuMonitorJSONSetVNCPasswordLegacy(qemuMonitorPtr mon, + const char *password) { int ret = -1; virJSONValuePtr cmd = qemuMonitorJSONMakeCommand("change", diff --git a/src/qemu/qemu_monitor_json.h b/src/qemu/qemu_monitor_json.h index ec243becc..dec7a5cf9 100644 --- a/src/qemu/qemu_monitor_json.h +++ b/src/qemu/qemu_monitor_json.h @@ -92,8 +92,8 @@ int qemuMonitorJSONBlockResize(qemuMonitorPtr mon, const char *devce, unsigned long long size); -int qemuMonitorJSONSetVNCPassword(qemuMonitorPtr mon, - const char *password); +int qemuMonitorJSONSetVNCPasswordLegacy(qemuMonitorPtr mon, + const char *password); int qemuMonitorJSONSetPassword(qemuMonitorPtr mon, const char *protocol, const char *password, diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index 908ec3a3c..f9c59f2f0 100644 --- a/tests/qemumonitorjsontest.c +++ b/tests/qemumonitorjsontest.c @@ -1316,7 +1316,7 @@ cleanup: \ GEN_TEST_FUNC(qemuMonitorJSONSetLink, "vnet0", VIR_DOMAIN_NET_INTERFACE_LINK_STATE_DOWN) GEN_TEST_FUNC(qemuMonitorJSONBlockResize, "vda", 123456) -GEN_TEST_FUNC(qemuMonitorJSONSetVNCPassword, "secret_password") +GEN_TEST_FUNC(qemuMonitorJSONSetVNCPasswordLegacy, "secret_password") GEN_TEST_FUNC(qemuMonitorJSONSetPassword, "spice", "secret_password", "disconnect") GEN_TEST_FUNC(qemuMonitorJSONExpirePassword, "spice", "123456") GEN_TEST_FUNC(qemuMonitorJSONSetBalloon, 1024) @@ -2905,7 +2905,7 @@ mymain(void) DO_TEST_SIMPLE("rtc-reset-reinjection", qemuMonitorJSONRTCResetReinjection); DO_TEST_GEN(qemuMonitorJSONSetLink); DO_TEST_GEN(qemuMonitorJSONBlockResize); - DO_TEST_GEN(qemuMonitorJSONSetVNCPassword); + DO_TEST_GEN(qemuMonitorJSONSetVNCPasswordLegacy); DO_TEST_GEN(qemuMonitorJSONSetPassword); DO_TEST_GEN(qemuMonitorJSONExpirePassword); DO_TEST_GEN(qemuMonitorJSONSetBalloon); -- 2.13.6 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list