From ce812673dc11de6c067e87a13f5ac0341df7772d Mon Sep 17 00:00:00 2001 From: Eduardo Habkost Date: Thu, 10 Nov 2011 10:41:41 -0200 Subject: 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 --- migration-exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'migration-exec.c') diff --git a/migration-exec.c b/migration-exec.c index b7b1055e88..626b648634 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; -- cgit v1.2.1