From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49181) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VH90p-0002k8-No for qemu-devel@nongnu.org; Wed, 04 Sep 2013 05:04:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VH90g-0007PO-92 for qemu-devel@nongnu.org; Wed, 04 Sep 2013 05:04:31 -0400 Received: from e23smtp05.au.ibm.com ([202.81.31.147]:53012) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VH90f-0007Oo-EW for qemu-devel@nongnu.org; Wed, 04 Sep 2013 05:04:22 -0400 Received: from /spool/local by e23smtp05.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 4 Sep 2013 18:56:46 +1000 Received: from d23relay03.au.ibm.com (d23relay03.au.ibm.com [9.190.235.21]) by d23dlp02.au.ibm.com (Postfix) with ESMTP id 3B5472BB0052 for ; Wed, 4 Sep 2013 19:04:08 +1000 (EST) Received: from d23av04.au.ibm.com (d23av04.au.ibm.com [9.190.235.139]) by d23relay03.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r8493vcp59899996 for ; Wed, 4 Sep 2013 19:03:57 +1000 Received: from d23av04.au.ibm.com (loopback [127.0.0.1]) by d23av04.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r84947MD029297 for ; Wed, 4 Sep 2013 19:04:07 +1000 From: Lei Li Date: Wed, 4 Sep 2013 17:02:34 +0800 Message-Id: <1378285356-5308-2-git-send-email-lilei@linux.vnet.ibm.com> In-Reply-To: <1378285356-5308-1-git-send-email-lilei@linux.vnet.ibm.com> References: <1378285356-5308-1-git-send-email-lilei@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 1/3 resend v2] savevm: add comments for qemu_file_get_error() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: pbonzini@redhat.com, Lei Li , anthony@codemonkey.ws, mrhines@linux.vnet.ibm.com, quintela@redhat.com Add comments for qemu_file_get_error(), as its return value is not very clear. Signed-off-by: Lei Li --- savevm.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/savevm.c b/savevm.c index 03fc4d9..95a11f9 100644 --- a/savevm.c +++ b/savevm.c @@ -566,6 +566,13 @@ QEMUFile *qemu_fopen_ops(void *opaque, const QEMUFileOps *ops) return f; } +/* + * Get last error for stream f + * + * Return negative error value if there has been an error on previous + * operations, return 0 if no error happened. + * + */ int qemu_file_get_error(QEMUFile *f) { return f->last_error; -- 1.7.7.6