Yoshiaki Tamura <tamura.yoshi...@lab.ntt.co.jp> wrote:
> Introduce skip_header parameter to qemu_loadvm_state() so that it can
> be called iteratively without reading the header.
>
> Signed-off-by: Yoshiaki Tamura <tamura.yoshi...@lab.ntt.co.jp>
> ---
>  migration.c |    2 +-
>  savevm.c    |   24 +++++++++++++-----------
>  sysemu.h    |    2 +-
>  3 files changed, 15 insertions(+), 13 deletions(-)
>
> diff --git a/migration.c b/migration.c
> index 302b8fe..bd51fef 100644
> --- a/migration.c
> +++ b/migration.c
> @@ -63,7 +63,7 @@ int qemu_start_incoming_migration(const char *uri)
>  
>  void process_incoming_migration(QEMUFile *f)
>  {
> -    if (qemu_loadvm_state(f) < 0) {
> +    if (qemu_loadvm_state(f, 0) < 0) {
>          fprintf(stderr, "load of migration failed\n");
>          exit(0);
>      }

I think it would be better to just create a different function

qemu_loadvm_state_internal() (better name)

and that qemu_loadvm_state() just does the other tests and call
qemu_loadvm_state_internal?


Later, Juan.

Reply via email to