[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 40/41] savevm: make qemu_file_put_notify() retur
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 40/41] savevm: make qemu_file_put_notify() return errors |
Date: |
Fri, 21 Sep 2012 14:53:56 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120911 Thunderbird/15.0.1 |
Il 21/09/2012 10:47, Juan Quintela ha scritto:
> Signed-off-by: Juan Quintela <address@hidden>
> ---
> migration.c | 5 +++--
> qemu-file.h | 2 +-
> savevm.c | 4 ++--
> 3 files changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/migration.c b/migration.c
> index 6a505c1..2c29d04 100644
> --- a/migration.c
> +++ b/migration.c
> @@ -285,10 +285,11 @@ static void migrate_fd_completed(MigrationState *s)
> static void migrate_fd_put_notify(void *opaque)
> {
> MigrationState *s = opaque;
> + int ret;
>
> qemu_set_fd_handler2(s->fd, NULL, NULL, NULL, NULL);
> - qemu_file_put_notify(s->file);
> - if (s->file && qemu_file_get_error(s->file)) {
> + ret = qemu_file_put_notify(s->file);
> + if (ret) {
> migrate_fd_error(s);
> }
> }
> diff --git a/qemu-file.h b/qemu-file.h
> index 8dd9207..9c8985b 100644
> --- a/qemu-file.h
> +++ b/qemu-file.h
> @@ -107,7 +107,7 @@ int qemu_file_get_error(QEMUFile *f);
> /* Try to send any outstanding data. This function is useful when output is
> * halted due to rate limiting or EAGAIN errors occur as it can be used to
> * resume output. */
> -void qemu_file_put_notify(QEMUFile *f);
> +int qemu_file_put_notify(QEMUFile *f);
>
> static inline void qemu_put_be64s(QEMUFile *f, const uint64_t *pv)
> {
> diff --git a/savevm.c b/savevm.c
> index 68c0464..2ea1fa6 100644
> --- a/savevm.c
> +++ b/savevm.c
> @@ -523,9 +523,9 @@ int qemu_fclose(QEMUFile *f)
> return ret;
> }
>
> -void qemu_file_put_notify(QEMUFile *f)
> +int qemu_file_put_notify(QEMUFile *f)
> {
> - f->put_buffer(f->opaque, NULL, 0, 0);
> + return f->put_buffer(f->opaque, NULL, 0, 0);
> }
>
> void qemu_put_buffer(QEMUFile *f, const uint8_t *buf, int size)
>
Reviewed-by: Paolo Bonzini <address@hidden>
- Re: [Qemu-devel] [PATCH 23/41] buffered_file: We can access directly to bandwidth_limit, (continued)
- [Qemu-devel] [PATCH 26/41] migration: make migrate_fd_wait_for_unfreeze() return errors, Juan Quintela, 2012/09/21
- [Qemu-devel] [PATCH 29/41] savevm: Remove qemu_fseek(), Juan Quintela, 2012/09/21
- [Qemu-devel] [PATCH 30/41] savevm: make qemu_fflush() return an error code, Juan Quintela, 2012/09/21
- [Qemu-devel] [PATCH 38/41] block-migration: handle errors with the return codes correctly, Juan Quintela, 2012/09/21
- [Qemu-devel] [PATCH 40/41] savevm: make qemu_file_put_notify() return errors, Juan Quintela, 2012/09/21
- Re: [Qemu-devel] [PATCH 40/41] savevm: make qemu_file_put_notify() return errors,
Paolo Bonzini <=
- [Qemu-devel] [PATCH 36/41] block-migration: make flush_blks() return errors, Juan Quintela, 2012/09/21
- [Qemu-devel] [PATCH 39/41] savevm: un-export qemu_file_set_error(), Juan Quintela, 2012/09/21
- [Qemu-devel] [PATCH 25/41] buffered_file: make buffered_flush return the error code, Juan Quintela, 2012/09/21
- [Qemu-devel] [PATCH 33/41] savevm: make qemu_fill_buffer() be consistent, Juan Quintela, 2012/09/21
- [Qemu-devel] [PATCH 32/41] savevm: unexport qemu_ftell(), Juan Quintela, 2012/09/21