mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-27 20:33:54 -06:00
monitor: Convert client_migrate_info to QAPI
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>
This commit is contained in:
parent
13cadefbda
commit
b8a185bc9a
6 changed files with 57 additions and 27 deletions
17
hmp.c
17
hmp.c
|
@ -1250,6 +1250,23 @@ void hmp_migrate_set_parameter(Monitor *mon, const QDict *qdict)
|
|||
}
|
||||
}
|
||||
|
||||
void hmp_client_migrate_info(Monitor *mon, const QDict *qdict)
|
||||
{
|
||||
Error *err = NULL;
|
||||
const char *protocol = qdict_get_str(qdict, "protocol");
|
||||
const char *hostname = qdict_get_str(qdict, "hostname");
|
||||
bool has_port = qdict_haskey(qdict, "port");
|
||||
int port = qdict_get_try_int(qdict, "port", -1);
|
||||
bool has_tls_port = qdict_haskey(qdict, "tls-port");
|
||||
int tls_port = qdict_get_try_int(qdict, "tls-port", -1);
|
||||
const char *cert_subject = qdict_get_try_str(qdict, "cert-subject");
|
||||
|
||||
qmp_client_migrate_info(protocol, hostname,
|
||||
has_port, port, has_tls_port, tls_port,
|
||||
!!cert_subject, cert_subject, &err);
|
||||
hmp_handle_error(mon, &err);
|
||||
}
|
||||
|
||||
void hmp_set_password(Monitor *mon, const QDict *qdict)
|
||||
{
|
||||
const char *protocol = qdict_get_str(qdict, "protocol");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue