qemu-e2k/migration
Juan Quintela be07a0ed22 qemu-file: Make qemu_fflush() return errors
This let us simplify code of this shape.

   qemu_fflush(f);
   int ret = qemu_file_get_error(f);
   if (ret) {
      return ret;
   }

into:

   int ret = qemu_fflush(f);
   if (ret) {
      return ret;
   }

I updated all callers where there is any error check.
qemu_fclose() don't need to check for f->last_error because
qemu_fflush() returns it at the beggining of the function.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Signed-off-by: Juan Quintela <quintela@redhat.com>

Message-ID: <20231025091117.6342-13-quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
2023-10-31 08:44:33 +01:00
..
block-dirty-bitmap.c
block.c qemu-file: Remove _noflush from qemu_file_transferred_noflush() 2023-10-31 08:44:33 +01:00
block.h
channel-block.c
channel-block.h
channel.c
channel.h
colo-failover.c
colo.c qemu-file: Make qemu_fflush() return errors 2023-10-31 08:44:33 +01:00
dirtyrate.c
dirtyrate.h
exec.c
exec.h
fd.c
fd.h
file.c
file.h
global_state.c
meson.build
migration-hmp-cmds.c migration: migrate 'blk' command option is deprecated. 2023-10-31 08:44:33 +01:00
migration-stats.c migration: migration_rate_limit_reset() don't need the QEMUFile 2023-10-31 08:44:33 +01:00
migration-stats.h migration: Remove transferred atomic counter 2023-10-31 08:44:33 +01:00
migration.c qemu-file: Make qemu_fflush() return errors 2023-10-31 08:44:33 +01:00
migration.h
multifd-zlib.c
multifd-zstd.c
multifd.c migration: Remove transferred atomic counter 2023-10-31 08:44:33 +01:00
multifd.h
options.c migration: Deprecate old compression method 2023-10-31 08:44:33 +01:00
options.h
page_cache.c
page_cache.h
postcopy-ram.c
postcopy-ram.h
qemu-file.c qemu-file: Make qemu_fflush() return errors 2023-10-31 08:44:33 +01:00
qemu-file.h qemu-file: Make qemu_fflush() return errors 2023-10-31 08:44:33 +01:00
ram-compress.c migration: Rename ram_compressed_pages() to compress_ram_pages() 2023-10-30 17:41:55 +01:00
ram-compress.h migration: Rename ram_compressed_pages() to compress_ram_pages() 2023-10-30 17:41:55 +01:00
ram.c qemu-file: Make qemu_fflush() return errors 2023-10-31 08:44:33 +01:00
ram.h migration: Create compress_update_rates() 2023-10-30 17:41:55 +01:00
rdma.c qemu-file: Make qemu_fflush() return errors 2023-10-31 08:44:33 +01:00
rdma.h migration/rdma: Remove qemu_ prefix from exported functions 2023-10-17 09:25:13 +02:00
savevm.c qemu-file: Make qemu_fflush() return errors 2023-10-31 08:44:33 +01:00
savevm.h
socket.c
socket.h
target.c
threadinfo.c
threadinfo.h
tls.c
tls.h
trace-events migration/multifd: Clarify Error usage in multifd_channel_connect 2023-10-17 09:25:14 +02:00
trace.h
vmstate-types.c
vmstate.c qemu-file: Remove _noflush from qemu_file_transferred_noflush() 2023-10-31 08:44:33 +01:00
xbzrle.c
xbzrle.h
yank_functions.c
yank_functions.h