mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
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>
This commit is contained in:
parent
1f08e34151
commit
9cc0765165
2 changed files with 78 additions and 0 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue