[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 26/31] hmp: remove "change vnc TARGET" command
From: |
Paolo Bonzini |
Subject: |
[PULL 26/31] hmp: remove "change vnc TARGET" command |
Date: |
Sat, 23 Jan 2021 09:31:23 -0500 |
The HMP command \"change vnc TARGET\" is messy:
- it takes an ugly shortcut to determine if the option has an "id",
with incorrect results if "id=" is not preceded by an unescaped
comma.
- it deletes the existing QemuOpts and does not try to rollback
if the parsing fails (which is not causing problems, but only due to
how VNC options are parsed)
- because it uses the same parsing function as "-vnc", it forces
the latter to not support "-vnc help".
On top of this, it uses a deprecated QMP command, thus getting in
the way of removing the QMP command. Since the usecase for the
command is not clear, just remove it and send "change vnc password"
directly to the QMP "change-vnc-password" command.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Message-Id: <20210120144235.345983-2-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
docs/system/removed-features.rst | 6 ++++++
hmp-commands.hx | 6 ------
monitor/hmp-cmds.c | 7 +++++--
3 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/docs/system/removed-features.rst b/docs/system/removed-features.rst
index 430fc33ca1..5b0ff6ab1f 100644
--- a/docs/system/removed-features.rst
+++ b/docs/system/removed-features.rst
@@ -68,6 +68,12 @@ The ``[hub_id name]`` parameter tuple of the 'hostfwd_add'
and
Use ``device_add`` for hotplugging vCPUs instead of ``cpu-add``. See
documentation of ``query-hotpluggable-cpus`` for additional details.
+``change vnc TARGET`` (removed in 6.0)
+''''''''''''''''''''''''''''''''''''''
+
+No replacement. The ``change vnc password`` and ``change DEVICE MEDIUM``
+commands are not affected.
+
Guest Emulator ISAs
-------------------
diff --git a/hmp-commands.hx b/hmp-commands.hx
index 73e0832ea1..d4001f9c5d 100644
--- a/hmp-commands.hx
+++ b/hmp-commands.hx
@@ -231,12 +231,6 @@ SRST
read-write
Makes the device writable.
- ``change vnc`` *display*,\ *options*
- Change the configuration of the VNC server. The valid syntax for *display*
- and *options* are described at :ref:`sec_005finvocation`. eg::
-
- (qemu) change vnc localhost:1
-
``change vnc password`` [*password*]
Change the password associated with the VNC server. If the new password
diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c
index fd4d77e246..499647a578 100644
--- a/monitor/hmp-cmds.c
+++ b/monitor/hmp-cmds.c
@@ -1521,13 +1521,16 @@ void hmp_change(Monitor *mon, const QDict *qdict)
}
if (strcmp(target, "passwd") == 0 ||
strcmp(target, "password") == 0) {
- if (!arg) {
+ if (arg) {
MonitorHMP *hmp_mon = container_of(mon, MonitorHMP, common);
monitor_read_password(hmp_mon, hmp_change_read_arg, NULL);
return;
+ } else {
+ qmp_change_vnc_password(arg, &err);
}
+ } else {
+ monitor_printf(mon, "Expected 'password' after 'vnc'\n");
}
- qmp_change("vnc", target, !!arg, arg, &err);
} else
#endif
{
--
2.26.2
- [PULL 12/31] meson: Declare have_virtfs_proxy_helper in main meson.build, (continued)
- [PULL 12/31] meson: Declare have_virtfs_proxy_helper in main meson.build, Paolo Bonzini, 2021/01/23
- [PULL 15/31] meson: Summarize information related to directories first, Paolo Bonzini, 2021/01/23
- [PULL 16/31] meson: Display host binaries information altogether, Paolo Bonzini, 2021/01/23
- [PULL 17/31] meson: Summarize overall features altogether, Paolo Bonzini, 2021/01/23
- [PULL 19/31] meson: Display accelerators and selected targets altogether, Paolo Bonzini, 2021/01/23
- [PULL 09/31] build-sys: set global arguments for cflags/ldflags, Paolo Bonzini, 2021/01/23
- [PULL 18/31] meson: Summarize compilation-related information altogether, Paolo Bonzini, 2021/01/23
- [PULL 24/31] meson.build: Detect bzip2 program, Paolo Bonzini, 2021/01/23
- [PULL 22/31] meson: Add a section header for library dependencies, Paolo Bonzini, 2021/01/23
- [PULL 25/31] acceptance: switch to QMP change-vnc-password command, Paolo Bonzini, 2021/01/23
- [PULL 26/31] hmp: remove "change vnc TARGET" command,
Paolo Bonzini <=
- [PULL 11/31] slirp: update to git master, Paolo Bonzini, 2021/01/23
- [PULL 20/31] meson: Display block layer information altogether, Paolo Bonzini, 2021/01/23
- [PULL 21/31] meson: Display crypto-related information altogether, Paolo Bonzini, 2021/01/23
- [PULL 23/31] meson.build: Declare global edk2_targets / install_edk2_blobs variables, Paolo Bonzini, 2021/01/23
- [PULL 27/31] qmp: remove deprecated "change" command, Paolo Bonzini, 2021/01/23
- [PULL 29/31] qemu-option: clean up id vs. list->merge_lists, Paolo Bonzini, 2021/01/23
- [PULL 28/31] vnc: support "-vnc help", Paolo Bonzini, 2021/01/23
- [PULL 31/31] qemu-option: warn for short-form boolean options, Paolo Bonzini, 2021/01/23