From patchwork Thu Nov 10 12:41:41 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 124886 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 6B96FB6F72 for ; Fri, 11 Nov 2011 01:01:26 +1100 (EST) Received: from localhost ([::1]:37476 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ROTzM-0000ec-U7 for incoming@patchwork.ozlabs.org; Thu, 10 Nov 2011 07:44:16 -0500 Received: from eggs.gnu.org ([140.186.70.92]:58303) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ROTyU-0006Yv-LU for qemu-devel@nongnu.org; Thu, 10 Nov 2011 07:43:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ROTyT-0006qj-53 for qemu-devel@nongnu.org; Thu, 10 Nov 2011 07:43:22 -0500 Received: from mx1.redhat.com ([209.132.183.28]:62967) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ROTyS-0006qQ-S7 for qemu-devel@nongnu.org; Thu, 10 Nov 2011 07:43:21 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id pAAChIC9018055 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 10 Nov 2011 07:43:19 -0500 Received: from blackpad.lan.raisama.net (ovpn-113-78.phx2.redhat.com [10.3.113.78]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id pAAChIUG014240; Thu, 10 Nov 2011 07:43:18 -0500 Received: by blackpad.lan.raisama.net (Postfix, from userid 500) id F0678202C9B; Thu, 10 Nov 2011 10:41:48 -0200 (BRST) From: Eduardo Habkost To: qemu-devel@nongnu.org Date: Thu, 10 Nov 2011 10:41:41 -0200 Message-Id: <1320928908-19076-4-git-send-email-ehabkost@redhat.com> In-Reply-To: <1320928908-19076-1-git-send-email-ehabkost@redhat.com> References: <1320928908-19076-1-git-send-email-ehabkost@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 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;