History | View | Annotate | Download (17.6 kB)
qemu_file: use fwrite() correctly
fwrite() returns the number of items written. But when there is oneerror, it can return a short write.
In the particular bug that I was tracking, I did a migration to aread-only filesystem. And it was able to finish the migration...
qemu-file: Move QEMUFile code to qemu-file.c
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>Reviewed-by: Orit Wasserman <owasserm@redhat.com>Signed-off-by: Juan Quintela <quintela@redhat.com>