From patchwork Tue Sep 24 12:03:15 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juan Quintela X-Patchwork-Id: 277484 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 2A02B2C00CB for ; Tue, 24 Sep 2013 22:48:12 +1000 (EST) Received: from localhost ([::1]:45432 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VORN8-0006cI-IR for incoming@patchwork.ozlabs.org; Tue, 24 Sep 2013 08:05:42 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56503) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VORL6-0003jb-Au for qemu-devel@nongnu.org; Tue, 24 Sep 2013 08:03:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VORL0-0007cR-7O for qemu-devel@nongnu.org; Tue, 24 Sep 2013 08:03:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:18231) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VORKz-0007cK-Vb for qemu-devel@nongnu.org; Tue, 24 Sep 2013 08:03:30 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r8OC3QaH003916 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 24 Sep 2013 08:03:26 -0400 Received: from trasno.mitica (ovpn-113-73.phx2.redhat.com [10.3.113.73]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r8OC3Nkm020576; Tue, 24 Sep 2013 08:03:25 -0400 From: Juan Quintela To: qemu-devel@nongnu.org Date: Tue, 24 Sep 2013 14:03:15 +0200 Message-Id: <1380024203-25897-2-git-send-email-quintela@redhat.com> In-Reply-To: <1380024203-25897-1-git-send-email-quintela@redhat.com> References: <1380024203-25897-1-git-send-email-quintela@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Lei Li , anthony@codemonkey.ws Subject: [Qemu-devel] [PATCH 1/9] savevm: add comments for qemu_file_get_error() 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 From: Lei Li Add comments for qemu_file_get_error(), as its return value is not very clear. Signed-off-by: Lei Li Signed-off-by: Juan Quintela --- savevm.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/savevm.c b/savevm.c index 4a3c819..a834c6f 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;