diff options
author | Zihao Chang <changzihao1@huawei.com> | 2021-03-16 15:58:45 +0800 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2021-03-23 08:48:21 +0100 |
commit | 9cc07651655ee86eca41059f5ead8c4e5607c734 (patch) | |
tree | 36a0b9790f12da378b519eb1ffff096a445bbbc6 /monitor | |
parent | 1f08e3415120637cad7f540d9ceb4dba3136dbdd (diff) |
qmp: add new qmp display-reload
This patch provides a new qmp to reload display configuration
without restart VM, but only reloading the vnc tls certificates
is implemented.
Example:
{"execute": "display-reload", "arguments":{"type": "vnc", "tls-certs": true}}
Signed-off-by: Zihao Chang <changzihao1@huawei.com>
Message-Id: <20210316075845.1476-4-changzihao1@huawei.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'monitor')
-rw-r--r-- | monitor/qmp-cmds.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/monitor/qmp-cmds.c b/monitor/qmp-cmds.c index c7df8c0ee2..f7d64a6457 100644 --- a/monitor/qmp-cmds.c +++ b/monitor/qmp-cmds.c @@ -334,3 +334,20 @@ MemoryInfo *qmp_query_memory_size_summary(Error **errp) return mem_info; } + +void qmp_display_reload(DisplayReloadOptions *arg, Error **errp) +{ + switch (arg->type) { + case DISPLAY_RELOAD_TYPE_VNC: +#ifdef CONFIG_VNC + if (arg->u.vnc.has_tls_certs && arg->u.vnc.tls_certs) { + vnc_display_reload_certs(NULL, errp); + } +#else + error_setg(errp, "vnc is invalid, missing 'CONFIG_VNC'"); +#endif + break; + default: + abort(); + } +} |