From patchwork Wed Nov 9 22:03:18 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 124738 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id DD482B6EE8 for ; Thu, 10 Nov 2011 09:53:14 +1100 (EST) Received: from localhost ([::1]:34980 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ROGGw-0006pj-8N for incoming@patchwork.ozlabs.org; Wed, 09 Nov 2011 17:05:30 -0500 Received: from eggs.gnu.org ([140.186.70.92]:50000) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ROGGS-0005WH-Ew for qemu-devel@nongnu.org; Wed, 09 Nov 2011 17:05:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ROGGP-0001Bk-Hx for qemu-devel@nongnu.org; Wed, 09 Nov 2011 17:05:00 -0500 Received: from mx1.redhat.com ([209.132.183.28]:7719) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ROGGP-0001B6-8X for qemu-devel@nongnu.org; Wed, 09 Nov 2011 17:04:57 -0500 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id pA9M4tnV029404 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 9 Nov 2011 17:04:55 -0500 Received: from blackpad.lan.raisama.net (ovpn-113-78.phx2.redhat.com [10.3.113.78]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id pA9M4swK011085; Wed, 9 Nov 2011 17:04:54 -0500 Received: by blackpad.lan.raisama.net (Postfix, from userid 500) id AD8C4202C9B; Wed, 9 Nov 2011 20:03:25 -0200 (BRST) From: Eduardo Habkost To: qemu-devel@nongnu.org Date: Wed, 9 Nov 2011 20:03:18 -0200 Message-Id: <1320876205-16113-4-git-send-email-ehabkost@redhat.com> In-Reply-To: <1320876205-16113-1-git-send-email-ehabkost@redhat.com> References: <1320876205-16113-1-git-send-email-ehabkost@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 209.132.183.28 Cc: Michael Roth , Juan Quintela Subject: [Qemu-devel] [PATCH 03/10] exec_close(): accept any negative value as qemu_fclose() error X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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;