Patchwork [03/10] exec_close(): accept any negative value as qemu_fclose() error

login
register
mail settings
Submitter Eduardo Habkost
Date Nov. 9, 2011, 10:03 p.m.
Message ID <1320876205-16113-4-git-send-email-ehabkost@redhat.com>
Download mbox | patch
Permalink /patch/124738/
State New
Headers show

Comments

Eduardo Habkost - Nov. 9, 2011, 10:03 p.m.
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>
---
 migration-exec.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch

diff --git a/migration-exec.c b/migration-exec.c
index b7b1055..626b648 100644
--- a/migration-exec.c
+++ b/migration-exec.c
@@ -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;