migrate_fd_cleanup: accept any negative qemu_fclose() value as error
Also, we now return the qemu_fclose() value unchanged to the caller. For reference, the migrate_fd_cleanup() callers are the following: - migrate_fd_completed(): any negative value is considered an error, so the change is OK. - migrate_fd_error(): doesn't check the migrate_fd_cleanup() return value - migrate_fd_cancel(): doesn't check the migrate_fd_cleanup() return value Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
ce812673dc
commit
a6d34a949c
@ -174,9 +174,7 @@ static int migrate_fd_cleanup(MigrationState *s)
|
|||||||
|
|
||||||
if (s->file) {
|
if (s->file) {
|
||||||
DPRINTF("closing file\n");
|
DPRINTF("closing file\n");
|
||||||
if (qemu_fclose(s->file) != 0) {
|
ret = qemu_fclose(s->file);
|
||||||
ret = -1;
|
|
||||||
}
|
|
||||||
s->file = NULL;
|
s->file = NULL;
|
||||||
} else {
|
} else {
|
||||||
if (s->mon) {
|
if (s->mon) {
|
||||||
|
Loading…
Reference in New Issue
Block a user