Patchwork [10/36] migration: set error if select return one error

login
register
mail settings
Submitter Juan Quintela
Date Oct. 11, 2011, 10 a.m.
Message ID <25f29b775f9d35250bf876886d303a726a856e6d.1318326683.git.quintela@redhat.com>
Download mbox | patch
Permalink /patch/118911/
State New
Headers show

Comments

Juan Quintela - Oct. 11, 2011, 10 a.m.
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 migration.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
Anthony Liguori - Oct. 17, 2011, 1:59 p.m.
On 10/11/2011 05:00 AM, Juan Quintela wrote:
> Signed-off-by: Juan Quintela<quintela@redhat.com>

Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>

Regards,

Anthony Liguori

> ---
>   migration.c |    4 ++++
>   1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/migration.c b/migration.c
> index 090c925..56c2b1c 100644
> --- a/migration.c
> +++ b/migration.c
> @@ -457,6 +457,10 @@ void migrate_fd_wait_for_unfreeze(void *opaque)
>
>           ret = select(s->fd + 1, NULL,&wfds, NULL, NULL);
>       } while (ret == -1&&  (s->get_error(s)) == EINTR);
> +
> +    if (ret == -1) {
> +        qemu_file_set_error(s->file);
> +    }
>   }
>
>   int migrate_fd_close(void *opaque)

Patch

diff --git a/migration.c b/migration.c
index 090c925..56c2b1c 100644
--- a/migration.c
+++ b/migration.c
@@ -457,6 +457,10 @@  void migrate_fd_wait_for_unfreeze(void *opaque)

         ret = select(s->fd + 1, NULL, &wfds, NULL, NULL);
     } while (ret == -1 && (s->get_error(s)) == EINTR);
+
+    if (ret == -1) {
+        qemu_file_set_error(s->file);
+    }
 }

 int migrate_fd_close(void *opaque)