]> git.proxmox.com Git - mirror_qemu.git/commit - migration/migration.c
migrate: Share common MigrationParameters struct
authorEric Blake <eblake@redhat.com>
Fri, 9 Sep 2016 03:14:15 +0000 (22:14 -0500)
committerJuan Quintela <quintela@trasno.org>
Thu, 13 Oct 2016 15:23:53 +0000 (17:23 +0200)
commitde63ab61241b44598cdfd30060ef23d46d368f9d
treebad73f323cbab948879b2c5534384790b5032d2e
parentbb2b777cf9a2862fe31a40256659ff49ae3d2006
migrate: Share common MigrationParameters struct

It is rather verbose, and slightly error-prone, to repeat
the same set of parameters for input (migrate-set-parameters)
as for output (query-migrate-parameters), where the only
difference is whether the members are optional.  We can just
document that the optional members will always be present
on output, and then share a common struct between both
commands.  The next patch can then reduce the amount of
code needed on input.

Also, we made a mistake in qemu 2.7 of returning an empty
string during 'query-migrate-parameters' when there is no
TLS, rather than omitting TLS details entirely.  Technically,
this change risks breaking any 2.7 client that is hard-coded
to expect the parameter's existence; on the other hand, clients
that are portable to 2.6 already must be prepared for those
members to not be present.

And this gets rid of yet one more place where the QMP output
visitor is silently converting a NULL string into "" (which
is a hack I ultimately want to kill off).

Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
hmp.c
migration/migration.c
qapi-schema.json