From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:35098) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RLJuS-0002pq-Ar for qemu-devel@nongnu.org; Tue, 01 Nov 2011 15:22:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RLJuH-00087K-Kr for qemu-devel@nongnu.org; Tue, 01 Nov 2011 15:22:02 -0400 Received: from mx1.redhat.com ([209.132.183.28]:64134) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RLJuH-00086c-D1 for qemu-devel@nongnu.org; Tue, 01 Nov 2011 15:21:57 -0400 From: Eduardo Habkost Date: Tue, 1 Nov 2011 17:20:22 -0200 Message-Id: <1320175230-27980-4-git-send-email-ehabkost@redhat.com> In-Reply-To: <1320175230-27980-1-git-send-email-ehabkost@redhat.com> References: <1320175230-27980-1-git-send-email-ehabkost@redhat.com> Subject: [Qemu-devel] [RFC PATCH 03/11] exec_close(): accept any negative value as qemu_fclose() error List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Michael Roth , Juan Quintela 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 --- migration-exec.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) 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; -- 1.7.3.2