From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47707) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VCrU1-0002cw-Ti for qemu-devel@nongnu.org; Fri, 23 Aug 2013 09:33:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VCrTq-0000ne-2y for qemu-devel@nongnu.org; Fri, 23 Aug 2013 09:32:57 -0400 Received: from e23smtp01.au.ibm.com ([202.81.31.143]:38048) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VCrTj-0000fY-Ut for qemu-devel@nongnu.org; Fri, 23 Aug 2013 09:32:46 -0400 Received: from /spool/local by e23smtp01.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 23 Aug 2013 23:21:51 +1000 Received: from d23relay05.au.ibm.com (d23relay05.au.ibm.com [9.190.235.152]) by d23dlp03.au.ibm.com (Postfix) with ESMTP id 037583578052 for ; Fri, 23 Aug 2013 23:32:16 +1000 (EST) Received: from d23av01.au.ibm.com (d23av01.au.ibm.com [9.190.234.96]) by d23relay05.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r7NDFxoF18677940 for ; Fri, 23 Aug 2013 23:16:06 +1000 Received: from d23av01.au.ibm.com (localhost [127.0.0.1]) by d23av01.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id r7NDW7A8007786 for ; Fri, 23 Aug 2013 23:32:08 +1000 From: Lei Li Date: Fri, 23 Aug 2013 21:30:51 +0800 Message-Id: <1377264653-31031-1-git-send-email-lilei@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH resend 1/3] 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, mrhines@linux.vnet.ibm.com, anthony@codemonkey.ws, Lei Li 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