qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 10/12] migration: move qemu_fclose to process_in


From: Orit Wasserman
Subject: Re: [Qemu-devel] [PATCH 10/12] migration: move qemu_fclose to process_incoming_migration
Date: Sun, 28 Oct 2012 11:56:33 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120911 Thunderbird/15.0.1

On 10/18/2012 12:22 PM, Paolo Bonzini wrote:
> The common suffix is now just process_incoming_migration.
> 
> Signed-off-by: Paolo Bonzini <address@hidden>
> ---
>  migration-exec.c | 1 -
>  migration-fd.c   | 1 -
>  migration-tcp.c  | 1 -
>  migration-unix.c | 1 -
>  migration.c      | 6 +++++-
>  5 file modificati, 5 inserzioni(+), 5 rimozioni(-)
> 
> diff --git a/migration-exec.c b/migration-exec.c
> index 1c562ab..89576d8 100644
> --- a/migration-exec.c
> +++ b/migration-exec.c
> @@ -97,7 +97,6 @@ static void exec_accept_incoming_migration(void *opaque)
>  
>      qemu_set_fd_handler2(qemu_get_fd(f), NULL, NULL, NULL, NULL);
>      process_incoming_migration(f);
> -    qemu_fclose(f);
>  }
>  
>  int exec_start_incoming_migration(const char *command)
> diff --git a/migration-fd.c b/migration-fd.c
> index 67ee3d1..ef7c9de 100644
> --- a/migration-fd.c
> +++ b/migration-fd.c
> @@ -102,7 +102,6 @@ static void fd_accept_incoming_migration(void *opaque)
>  
>      qemu_set_fd_handler2(qemu_get_fd(f), NULL, NULL, NULL, NULL);
>      process_incoming_migration(f);
> -    qemu_fclose(f);
>  }
>  
>  int fd_start_incoming_migration(const char *infd)
> diff --git a/migration-tcp.c b/migration-tcp.c
> index 463f7f6..f68692e 100644
> --- a/migration-tcp.c
> +++ b/migration-tcp.c
> @@ -110,7 +110,6 @@ static void tcp_accept_incoming_migration(void *opaque)
>      }
>  
>      process_incoming_migration(f);
> -    qemu_fclose(f);
>      return;
>  
>  out:
> diff --git a/migration-unix.c b/migration-unix.c
> index 46e04fc..f0411cf 100644
> --- a/migration-unix.c
> +++ b/migration-unix.c
> @@ -143,7 +143,6 @@ static void unix_accept_incoming_migration(void *opaque)
>      }
>  
>      process_incoming_migration(f);
> -    qemu_fclose(f);
>      return;
>  
>  out:
> diff --git a/migration.c b/migration.c
> index c1807e0..0d74753 100644
> --- a/migration.c
> +++ b/migration.c
> @@ -88,7 +88,11 @@ int qemu_start_incoming_migration(const char *uri, Error 
> **errp)
>  
>  void process_incoming_migration(QEMUFile *f)
>  {
> -    if (qemu_loadvm_state(f) < 0) {
> +    int ret;
> +
> +    ret = qemu_loadvm_state(f);
> +    qemu_fclose(f);
> +    if (ret < 0) {
>          fprintf(stderr, "load of migration failed\n");
>          exit(0);
>      }
> 
Reviewed-by: Orit Wasserman <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]