]> git.proxmox.com Git - qemu.git/commit - migration.c
migration: simplify error handling
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 22 Feb 2013 16:36:17 +0000 (17:36 +0100)
committerJuan Quintela <quintela@redhat.com>
Mon, 11 Mar 2013 12:32:01 +0000 (13:32 +0100)
commitdba433c03a0f5dc22a459435dd89557886298921
tree7311d20dd8d7b3cc767486023df055d8f5ab69a9
parent63dfbd7ee03185c181a0791958ec9c8337089b55
migration: simplify error handling

Always use qemu_file_get_error to detect errors, since that is how
QEMUFile itself drops I/O after an error occurs.  There is no need
to propagate and check return values all the time.

Also remove the "complete" member, since we know that it is set (via
migrate_fd_cleanup) only when the state changes.

Reviewed-by: Orit Wasserman <owasserm@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
include/migration/migration.h
migration.c