From patchwork Wed Nov 9 22:03:17 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 124726 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 001E8B6F71 for ; Thu, 10 Nov 2011 09:19:57 +1100 (EST) Received: from localhost ([::1]:34977 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ROGGv-0006pf-D4 for incoming@patchwork.ozlabs.org; Wed, 09 Nov 2011 17:05:29 -0500 Received: from eggs.gnu.org ([140.186.70.92]:49967) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ROGGR-0005W9-CE for qemu-devel@nongnu.org; Wed, 09 Nov 2011 17:05:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ROGGP-0001BG-3Y for qemu-devel@nongnu.org; Wed, 09 Nov 2011 17:04:59 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56221) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ROGGO-0001Aw-Sl 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 pA9M4tqY004132 (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 pA9M4s3Z011083; Wed, 9 Nov 2011 17:04:54 -0500 Received: by blackpad.lan.raisama.net (Postfix, from userid 500) id 9AF89202C6E; Wed, 9 Nov 2011 20:03:25 -0200 (BRST) From: Eduardo Habkost To: qemu-devel@nongnu.org Date: Wed, 9 Nov 2011 20:03:17 -0200 Message-Id: <1320876205-16113-3-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 02/10] QEMUFileCloseFunc: add return value documentation (v2) 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 qemu_fclose() and QEMUFile->close will return -errno on error, and any positive value on success. We need the positive non-zero success values because migration-exec.c:exec_close() relies on non-zero return values to get the process exit code. Changes v1 -> v2: - Cosmetic spelling change on comment text Signed-off-by: Eduardo Habkost --- hw/hw.h | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/hw/hw.h b/hw/hw.h index ed20f5a..efa04d1 100644 --- a/hw/hw.h +++ b/hw/hw.h @@ -27,7 +27,13 @@ typedef int (QEMUFilePutBufferFunc)(void *opaque, const uint8_t *buf, typedef int (QEMUFileGetBufferFunc)(void *opaque, uint8_t *buf, int64_t pos, int size); -/* Close a file and return an error code */ +/* Close a file + * + * Return negative error number on error, 0 or positive value on success. + * + * The meaning of return value on success depends on the specific back-end being + * used. + */ typedef int (QEMUFileCloseFunc)(void *opaque); /* Called to determine if the file has exceeded it's bandwidth allocation. The