From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:58289) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ROTyU-0006Yt-Am for qemu-devel@nongnu.org; Thu, 10 Nov 2011 07:43:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ROTyT-0006qf-4z for qemu-devel@nongnu.org; Thu, 10 Nov 2011 07:43:22 -0500 Received: from mx1.redhat.com ([209.132.183.28]:9136) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ROTyS-0006qO-S8 for qemu-devel@nongnu.org; Thu, 10 Nov 2011 07:43:21 -0500 From: Eduardo Habkost Date: Thu, 10 Nov 2011 10:41:40 -0200 Message-Id: <1320928908-19076-3-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> Subject: [Qemu-devel] [PATCH 02/10] QEMUFileCloseFunc: add return value documentation (v2) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Michael Roth , Juan Quintela 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 -- 1.7.3.2