From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48961) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VDt8b-0002qW-Eh for qemu-devel@nongnu.org; Mon, 26 Aug 2013 05:31:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VDt8S-0003dn-Aq for qemu-devel@nongnu.org; Mon, 26 Aug 2013 05:31:05 -0400 Received: from e23smtp05.au.ibm.com ([202.81.31.147]:53440) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VDt8R-0003dZ-Od for qemu-devel@nongnu.org; Mon, 26 Aug 2013 05:30:56 -0400 Received: from /spool/local by e23smtp05.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 26 Aug 2013 19:23:33 +1000 Received: from d23relay03.au.ibm.com (d23relay03.au.ibm.com [9.190.235.21]) by d23dlp01.au.ibm.com (Postfix) with ESMTP id C82402CE804C for ; Mon, 26 Aug 2013 19:30:45 +1000 (EST) Received: from d23av03.au.ibm.com (d23av03.au.ibm.com [9.190.234.97]) by d23relay03.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r7Q9UXYt9044230 for ; Mon, 26 Aug 2013 19:30:34 +1000 Received: from d23av03.au.ibm.com (localhost [127.0.0.1]) by d23av03.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id r7Q9Uh6N020556 for ; Mon, 26 Aug 2013 19:30:44 +1000 From: Lei Li Date: Mon, 26 Aug 2013 17:29:26 +0800 Message-Id: <1377509368-24921-1-git-send-email-lilei@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 1/3 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, anthony@codemonkey.ws, mrhines@linux.vnet.ibm.com, 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