aboutsummaryrefslogtreecommitdiff
path: root/monitor
AgeCommit message (Collapse)AuthorFilesLines
2023-04-25monitor: convert monitor_cleanup() to AIO_WAIT_WHILE_UNLOCKED()Stefan Hajnoczi1-2/+2
monitor_cleanup() is called from the main loop thread. Calling AIO_WAIT_WHILE(qemu_get_aio_context(), ...) from the main loop thread is equivalent to AIO_WAIT_WHILE_UNLOCKED(NULL, ...) because neither unlocks the AioContext and the latter's assertion that we're in the main loop succeeds. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Message-Id: <20230309190855.414275-7-stefanha@redhat.com> Reviewed-by: Wilfred Mallawa <wilfred.mallawa@wdc.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2023-04-25hmp: convert handle_hmp_command() to AIO_WAIT_WHILE_UNLOCKED()Stefan Hajnoczi1-1/+1
The HMP monitor runs in the main loop thread. Calling AIO_WAIT_WHILE(qemu_get_aio_context(), ...) from the main loop thread is equivalent to AIO_WAIT_WHILE_UNLOCKED(NULL, ...) because neither unlocks the AioContext and the latter's assertion that we're in the main loop succeeds. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Message-Id: <20230309190855.414275-6-stefanha@redhat.com> Reviewed-by: Wilfred Mallawa <wilfred.mallawa@wdc.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2023-03-13monitor: restrict command getfd to POSIX hostsMarc-André Lureau2-0/+4
Currently, the function will simply fail if ancillary fds are not provided, for ex on unsupported platforms. This changes the failure from: {"error": {"class": "GenericError", "desc": "No file descriptor supplied via SCM_RIGHTS"}} to: {"error": {"class": "CommandNotFound", "desc": "The command getfd has not been found"}} Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com>
2023-03-13qmp: add 'get-win32-socket'Marc-André Lureau1-16/+60
A process with enough capabilities can duplicate a socket to QEMU. Add a QMP command to import it and add it to the monitor fd list, so it can be later used by other commands. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Acked-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20230306122751.2355515-9-marcandre.lureau@redhat.com>
2023-03-13monitor: release the lock before calling close()Marc-André Lureau1-1/+4
As per comment, presumably to avoid syscall in critical section. Fixes: 0210c3b39bef08 ("monitor: Use LOCK_GUARD macros") Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230306122751.2355515-7-marcandre.lureau@redhat.com>
2023-03-13qmp: 'add_client' actually expects socketsMarc-André Lureau1-0/+7
Whether it is SPICE, VNC, D-Bus, or the socket chardev, they all actually expect a socket kind or will fail in different ways at runtime. Throw an error early if the given 'add_client' fd is not a socket, and close it to avoid leaks. This allows to replace the close() call with a more correct & portable closesocket() version. (this will allow importing sockets on Windows with a specialized command in the following patch, while keeping the remaining monitor associated sockets/add_client code & usage untouched) Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Acked-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20230306122751.2355515-6-marcandre.lureau@redhat.com>
2023-03-01readline: fix hmp completion issueDongli Zhang1-6/+2
The auto completion does not work in some cases. Case 1. 1. (qemu) info reg 2. Press 'Tab'. 3. It does not auto complete. Case 2. 1. (qemu) block_resize flo 2. Press 'Tab'. 3. It does not auto complete 'floppy0'. Since the readline_add_completion_of() may add any completion when strlen(pfx) is zero, we remove the check with (name[0] == '\0') because strlen() always returns zero in that case. Fixes: 52f50b1e9f8f ("readline: Extract readline_add_completion_of() from monitor") Cc: Joe Jin <joe.jin@oracle.com> Signed-off-by: Dongli Zhang <dongli.zhang@oracle.com> Message-Id: <20230207045241.8843-1-dongli.zhang@oracle.com> Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Markus Armbruster <armbru@redhat.com> Tested-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
2023-02-04monitor: Rename misc.c to hmp-target.cMarkus Armbruster2-2/+2
What's left in misc.c is exactly the target-dependent part of the HMP core. Rename accordingly. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20230124121946.1139465-33-armbru@redhat.com>
2023-02-04monitor: Loosen coupling between misc.c and monitor.c slightlyMarkus Armbruster2-8/+2
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20230124121946.1139465-32-armbru@redhat.com>
2023-02-04monitor: Move remaining QMP stuff from misc.c to qmp-cmds.cMarkus Armbruster2-52/+52
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20230124121946.1139465-31-armbru@redhat.com>
2023-02-04monitor: Move remaining HMP commands from misc.c to hmp-cmds.cMarkus Armbruster2-219/+218
This requires giving them external linkage. Rename do_help_cmd() to hmp_help(), and do_print() to hmp_print(). Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20230124121946.1139465-30-armbru@redhat.com>
2023-02-04monitor: Move target-dependent HMP commands to hmp-cmds-target.cMarkus Armbruster3-351/+382
Target-independent hmp_gpa2hva(), hmp_gpa2hpa() move along to stay next to hmp_gva2gpa(). Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20230124121946.1139465-29-armbru@redhat.com>
2023-02-04monitor: Move monitor_putc() next to monitor_puts & external linkageMarkus Armbruster2-27/+27
monitor_putc() will soon be used from more than one .c file. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20230124121946.1139465-28-armbru@redhat.com>
2023-02-04monitor: Split file descriptor passing stuff off misc.cMarkus Armbruster3-434/+469
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20230124121946.1139465-27-armbru@redhat.com>
2023-02-04qdev: Move HMP command completion from monitor to softmmu/Markus Armbruster1-82/+0
This moves the completion code from MAINTAINERS sections "Human Monitor (HMP)" and "QMP" to section "QOM". Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20230124121946.1139465-26-armbru@redhat.com>
2023-02-04acpi: Move the QMP command from monitor/ to hw/acpi/Markus Armbruster1-21/+0
This moves the command from MAINTAINERS section "QMP" to section "ACPI/SMBIOS)". Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20230124121946.1139465-25-armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
2023-02-04stats: Move HMP commands from monitor/ to stats/Markus Armbruster1-234/+0
This moves these commands from MAINTAINERS section "Human Monitor (HMP)" to section "Stats". Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20230124121946.1139465-24-armbru@redhat.com>
2023-02-04stats: Move QMP commands from monitor/ to stats/Markus Armbruster1-152/+0
This moves these commands from MAINTAINERS section "QMP" to new section "Stats". Status is Orphan. Volunteers welcome! Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20230124121946.1139465-23-armbru@redhat.com>
2023-02-04runstate: Move HMP commands from monitor/ to softmmu/Markus Armbruster2-62/+0
This moves these commands from MAINTAINERS section "Human Monitor (HMP)" and "QMP" to "Main loop". Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20230124121946.1139465-22-armbru@redhat.com>
2023-02-04tpm: Move HMP commands from monitor/ to softmmu/Markus Armbruster1-54/+0
This moves these commands from MAINTAINERS section "Human Monitor (HMP)" to "TPM". Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20230124121946.1139465-21-armbru@redhat.com> Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
2023-02-04virtio: Move HMP commands from monitor/ to hw/virtio/Markus Armbruster1-309/+0
This moves these commands from MAINTAINERS section "Human Monitor (HMP)" to "virtio". Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20230124121946.1139465-20-armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
2023-02-04migration: Move the QMP command from monitor/ to migration/Markus Armbruster1-31/+0
This moves the command from MAINTAINERS sections "Human Monitor (HMP)" and "QMP" to "Migration". Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20230124121946.1139465-19-armbru@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com>
2023-02-04migration: Move HMP commands from monitor/ to migration/Markus Armbruster2-785/+0
This moves these commands from MAINTAINERS sections "Human Monitor (HMP)" and "QMP" to "Migration". Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20230124121946.1139465-18-armbru@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com>
2023-02-04net: Move hmp_info_network() to net-hmp-cmds.cMarkus Armbruster2-2/+0
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20230124121946.1139465-17-armbru@redhat.com>
2023-02-04net: Move HMP commands from monitor to net/Markus Armbruster2-117/+0
This moves these commands from MAINTAINERS sections "Human Monitor (HMP)" and "QMP" to "Network device backends". Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20230124121946.1139465-16-armbru@redhat.com>
2023-02-04hmp: Rewrite strlist_from_comma_list() as hmp_split_at_comma()Markus Armbruster1-17/+10
Use g_strsplit() for the actual splitting. Give external linkage, so the next commit can move one of its users to another source file. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20230124121946.1139465-15-armbru@redhat.com>
2023-02-04rocker: Move HMP commands from monitor to hw/net/rocker/Markus Armbruster1-297/+0
This moves these commands from MAINTAINERS section "Human Monitor (HMP)" to "Rocker" and "Network devices". Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20230124121946.1139465-14-armbru@redhat.com>
2023-02-04block: Factor out hmp_change_medium(), and move to block/monitor/Markus Armbruster1-16/+1
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20230124121946.1139465-13-armbru@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
2023-02-04qom: Move HMP commands from monitor/ to qom/Markus Armbruster2-68/+0
This moves these commands from MAINTAINERS sections "Human Monitor (HMP)" and "QMP" to "QOM". Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20230124121946.1139465-12-armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
2023-02-04machine: Move HMP commands from monitor/ to hw/core/Markus Armbruster1-209/+0
This moves these commands from MAINTAINERS section "Human Monitor (HMP)" to "Machine core". Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20230124121946.1139465-11-armbru@redhat.com>
2023-02-04machine: Move QMP commands from monitor/ to hw/core/Markus Armbruster1-140/+0
This moves these commands from MAINTAINERS section "QMP" to "Machine core". Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20230124121946.1139465-10-armbru@redhat.com>
2023-02-04trace: Move HMP commands from monitor/ to trace/Markus Armbruster1-119/+0
This moves these commands from MAINTAINERS sections "Human Monitor (HMP)" and "QMP" to "Tracing". Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20230124121946.1139465-9-armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
2023-02-04hmp: Rename help_cmd() to hmp_help_cmd(), move declaration to hmp.hMarkus Armbruster3-6/+5
The next commit will move a caller of help_cmd() to a new file. Including monitor/monitor-internal.h there just for help_cmd() feels silly. Better to provide it in monitor/hmp.h suitably renamed. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20230124121946.1139465-8-armbru@redhat.com>
2023-02-04readline: Extract readline_add_completion_of() from monitorMarkus Armbruster2-66/+31
monitor/misc.h has static add_completion_option(). It's useful elsewhere in the monitor. Since it's not monitor-specific, move it to util/readline.c renamed to readline_add_completion_of(), and put it to use. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20230124121946.1139465-7-armbru@redhat.com>
2023-02-04hmp: Drop redundant argument check from add_completion_option()Markus Armbruster1-3/+0
No need to check for null arguments, no caller passes them. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20230124121946.1139465-6-armbru@redhat.com>
2023-02-04char: Factor out qmp_add_client() parts and move to chardev/Markus Armbruster1-11/+2
Code moves from MAINTAINERS section "QMP" to "Character device backends". Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20230124121946.1139465-5-armbru@redhat.com>
2023-02-04char: Move HMP commands from monitor/ to chardev/Markus Armbruster2-201/+0
This moves these commands from MAINTAINERS sections "Human Monitor (HMP)" and "QMP" to "Character device backends". Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20230124121946.1139465-4-armbru@redhat.com>
2023-02-04audio: Move HMP commands from monitor/ to audio/Markus Armbruster1-56/+0
This moves these commands from MAINTAINERS sections "Human Monitor (HMP)" and "QMP" to "Overall Audio backends". Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20230124121946.1139465-3-armbru@redhat.com>
2023-02-04monitor: Drop unnecessary includesMarkus Armbruster5-27/+2
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20230124121946.1139465-2-armbru@redhat.com> Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
2023-01-20Merge tag 'pull-include-2023-01-20' of https://repo.or.cz/qemu/armbru into ↵Peter Maydell1-0/+1
staging Header cleanup patches for 2023-01-20 # -----BEGIN PGP SIGNATURE----- # # iQJGBAABCAAwFiEENUvIs9frKmtoZ05fOHC0AOuRhlMFAmPKN6YSHGFybWJydUBy # ZWRoYXQuY29tAAoJEDhwtADrkYZTPeoQAIKl/BF6PFRNq0/k3vPqMe6nltjgkpa/ # p7E5qRlo31RCeUB+f0iW26mySnNTgYkE28yy57HxUML/9Lp1bbxyDgRNiJ406a4L # kFVF04kOIFez1+mfvWN92DZqcl/EAAqNL6XqSFyO38kYwcsFsi+BZ7DLZbL9Ea8v # wVywB96mN6KyrLWCJ2D0OqIVuPHSHol+5zt9e6+ShBgN0FfElLbv0F4KH3VJ1olA # psKl6w6V9+c2zV1kT/H+S763m6mQdwtVo/UuOJoElI+Qib/UBxDOrhdYf4Zg7hKf # ByUuhJUASm8y9yD/42mFs90B6eUNzLSBC8v1PgRqSqDHtllveP4RysklBlyIMlOs # DKtqEuRuIJ/qDXliIFHY6tBnUkeITSd7BCxkQYfaGyaSOcviDSlE3AyaaBC0sY4F # P/lTTiRg5ksvhDYtJnW3mSfmT2PY7aBtyE3D1Z84v9hek6D0reMQTE97yL/j4m7P # wJP8aM3Z8GILCVxFIh02wmqWZhZUCGsIDS/vxVm+u060n66qtDIQFBoazsFJrCME # eWI+qDNDr6xhLegeYajGDM9pdpQc3x0siiuHso4wMSI9NZxwP+tkCVhTpqmrRcs4 # GSH/4IlUXqEZdUQDL38DfA22C1TV8BzyMhGLTUERWWYki1sr99yv0pdFyk5r3nLB # SURwr58rB2zo # =dOfq # -----END PGP SIGNATURE----- # gpg: Signature made Fri 20 Jan 2023 06:41:42 GMT # gpg: using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653 # gpg: issuer "armbru@redhat.com" # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full] # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" [full] # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653 * tag 'pull-include-2023-01-20' of https://repo.or.cz/qemu/armbru: include/hw/ppc include/hw/pci-host: Drop extra typedefs include/hw/ppc: Don't include hw/pci-host/pnv_phb.h from pnv.h include/hw/ppc: Supply a few missing includes include/hw/ppc: Split pnv_chip.h off pnv.h include/hw/block: Include hw/block/block.h where needed hw/sparc64/niagara: Use blk_name() instead of open-coding it include/block: Untangle inclusion loops coroutine: Use Coroutine typedef name instead of structure tag coroutine: Split qemu/coroutine-core.h off qemu/coroutine.h coroutine: Clean up superfluous inclusion of qemu/lockable.h coroutine: Move coroutine_fn to qemu/osdep.h, trim includes coroutine: Clean up superfluous inclusion of qemu/coroutine.h Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2023-01-20include/block: Untangle inclusion loopsMarkus Armbruster1-0/+1
We have two inclusion loops: block/block.h -> block/block-global-state.h -> block/block-common.h -> block/blockjob.h -> block/block.h block/block.h -> block/block-io.h -> block/block-common.h -> block/blockjob.h -> block/block.h I believe these go back to Emanuele's reorganization of the block API, merged a few months ago in commit d7e2fe4aac8. Fortunately, breaking them is merely a matter of deleting unnecessary includes from headers, and adding them back in places where they are now missing. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20221221133551.3967339-2-armbru@redhat.com>
2023-01-19Merge tag 'pull-monitor-2023-01-19' of https://repo.or.cz/qemu/armbru into ↵Peter Maydell3-576/+33
staging Monitor patches for 2023-01-19 # -----BEGIN PGP SIGNATURE----- # # iQJGBAABCAAwFiEENUvIs9frKmtoZ05fOHC0AOuRhlMFAmPJO+8SHGFybWJydUBy # ZWRoYXQuY29tAAoJEDhwtADrkYZTbBwP/RsZLLDCz6moSet4Hly+vPTWibyYYDkS # uk6a70Ja7fsAcONumBaXdpoinPtbED662eYxidbLFr//tAjnKu57jnwAIFTTOKJc # sCVtdgOlbNSZFrqyIr8ctY6yKJLLBaa02in/BczFIQphPatpUwvxrvrdgxc58NNK # qaeKDnWKXvZ6EUaYPpruxqE5J/NV0ykyab9Rc8rNJqdUMnqbd662zHcA0l31misH # gAfKBhReo53XUbfvoFS9kaoBQaTJPk4CcKHaT7NJXR8ezlIEQVLtFzdfAf04kSdG # 8VRwwx5NDpmafATEaMXJhJ74Fyc8biDWXoQ6aA1jdUCu39B2EPl1H1qlCG9ZYp7w # CkbJU6UwtOYsG11NU8Mr1u9rMlAgAVkkLsMYiiI4cpLBkI0vkoV66ms3oZgYUtbq # /TgCpfjKpE87ZBLIwJjGsg+TMN2AH5lpt/49HV8QEFA8mI7h29oo2HvheXE7PPzH # b9iIe9ADrKwB5DpJW2vigPj+fSHqoSGd3R/hUcMVOubKnJme97mys2hD+sfxga/H # qfKLzgTqQI2dGhfow/8wzfYdfYmkii+ggDyzcxLAxx2ITO/fLWJygmTgXJmA3dl6 # pnpZvhOu4dEgK4VstugXcvgCVHUVXd9wqI9wxJAc+mKanTmZIJBnxCm/QVG2/w/d # 5IgmP9Se7vb0 # =7OEC # -----END PGP SIGNATURE----- # gpg: Signature made Thu 19 Jan 2023 12:47:43 GMT # gpg: using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653 # gpg: issuer "armbru@redhat.com" # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full] # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" [full] # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653 * tag 'pull-monitor-2023-01-19' of https://repo.or.cz/qemu/armbru: ui: Simplify control flow in qemu_mouse_set() ui: Split hmp_mouse_set() and move the HMP part to ui/ ui: Don't check for mode change after mouse_set error ui: Reduce nesting in hmp_change_vnc() slightly ui: Factor out hmp_change_vnc(), and move to ui/ui-hmp-cmds.c ui: Improve "change vnc" error reporting ui: Move HMP commands from monitor to new ui/ui-hmp-cmds.c ui: Factor out qmp_add_client() parts and move to ui/ui-qmp-cmds.c ui: Move QMP commands from monitor to new ui/ui-qmp-cmds.c ui: Clean up a few things checkpatch.pl would flag later on ui/spice: Give hmp_info_spice()'s channel_names[] static linkage ui/spice: QXLInterface method set_mm_time() is now dead, drop ui/spice: Require spice-server >= 0.14.0 Revert "hmp: info spice: take out webdav" ui/spice: Require spice-protocol >= 0.14.0 ui: Fix silent truncation of numeric keys in HMP sendkey ui: Check numeric part of expire_password argument @time properly Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2023-01-19ui: Split hmp_mouse_set() and move the HMP part to ui/Markus Armbruster1-1/+0
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20230109190321.1056914-17-armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2023-01-19ui: Factor out hmp_change_vnc(), and move to ui/ui-hmp-cmds.cMarkus Armbruster2-29/+3
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230109190321.1056914-14-armbru@redhat.com>
2023-01-19ui: Improve "change vnc" error reportingMarkus Armbruster1-4/+4
Switch from monitor_printf() to error_setg() and hmp_handle_error(). This makes "this is an error" more obvious both in the source and in the monitor, where hmp_handle_error() prefixes the message with "Error: ". Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230109190321.1056914-13-armbru@redhat.com>
2023-01-19ui: Move HMP commands from monitor to new ui/ui-hmp-cmds.cMarkus Armbruster2-404/+0
This moves these commands from MAINTAINERS section "Human Monitor (HMP)" to "Graphics". Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230109190321.1056914-12-armbru@redhat.com>
2023-01-19ui: Factor out qmp_add_client() parts and move to ui/ui-qmp-cmds.cMarkus Armbruster1-41/+33
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230109190321.1056914-11-armbru@redhat.com>
2023-01-19ui: Move QMP commands from monitor to new ui/ui-qmp-cmds.cMarkus Armbruster1-118/+0
This moves these commands from MAINTAINERS section "QMP" to "Graphics". Command add-client applies to socket character devices in addition to display devices. Move it anyway. Aside: the way @protocol character device IDs and display types is bad design. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230109190321.1056914-10-armbru@redhat.com>
2023-01-19ui: Clean up a few things checkpatch.pl would flag later onMarkus Armbruster2-13/+15
Fix a few style violations so that checkpatch.pl won't complain when I move this code. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230109190321.1056914-9-armbru@redhat.com>
2023-01-19ui/spice: Give hmp_info_spice()'s channel_names[] static linkageMarkus Armbruster1-1/+1
Suggested-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230109190321.1056914-8-armbru@redhat.com>