From: Eduardo Habkost Date: Thu, 10 Nov 2011 12:41:41 +0000 (-0200) Subject: exec_close(): accept any negative value as qemu_fclose() error X-Git-Tag: TizenStudio_2.0_p2.3.2~208^2~4921 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ce812673dc11de6c067e87a13f5ac0341df7772d;p=sdk%2Femulator%2Fqemu.git exec_close(): accept any negative value as qemu_fclose() error 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 Signed-off-by: Anthony Liguori --- 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;