]> git.proxmox.com Git - mirror_qemu.git/commitdiff
exec_close(): accept any negative value as qemu_fclose() error
authorEduardo Habkost <ehabkost@redhat.com>
Thu, 10 Nov 2011 12:41:41 +0000 (10:41 -0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Mon, 12 Dec 2011 17:47:19 +0000 (11:47 -0600)
Note that we don't return the unchanged return value back yet, because
we need to change all qemu_fclose() callers to accept any positive value
as success.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
migration-exec.c

index b7b1055e881d877eeb70aa9ae72677e4c3a42da3..626b648634dde4af17070b4f27808eededa838a8 100644 (file)
@@ -50,7 +50,7 @@ static int exec_close(MigrationState *s)
         ret = qemu_fclose(s->opaque);
         s->opaque = NULL;
         s->fd = -1;
-        if (ret != -1 &&
+        if (ret >= 0 &&
             WIFEXITED(ret)
             && WEXITSTATUS(ret) == 0) {
             ret = 0;