From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LohBQ-0003W3-4e for qemu-devel@nongnu.org; Tue, 31 Mar 2009 12:51:28 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LohBJ-0003QV-VO for qemu-devel@nongnu.org; Tue, 31 Mar 2009 12:51:26 -0400 Received: from [199.232.76.173] (port=47410 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LohBJ-0003Pz-H2 for qemu-devel@nongnu.org; Tue, 31 Mar 2009 12:51:21 -0400 Received: from mx2.redhat.com ([66.187.237.31]:40360) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LohBH-0002ww-Ig for qemu-devel@nongnu.org; Tue, 31 Mar 2009 12:51:19 -0400 From: Glauber Costa Date: Tue, 31 Mar 2009 12:51:14 -0400 Message-Id: <1238518275-2980-3-git-send-email-glommer@redhat.com> In-Reply-To: <1238518275-2980-2-git-send-email-glommer@redhat.com> References: <1238518275-2980-1-git-send-email-glommer@redhat.com> <1238518275-2980-2-git-send-email-glommer@redhat.com> Subject: [Qemu-devel] [PATCH 2/3] create qemu_file_set_error Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Yaniv Kamay , aliguori@us.ibm.com, Dor Laor , avi@redhat.com This is mainly for consistency, since we don't want anything outside of savevm setting it explicitly. There are current no users of that in qemu tree, but there are potential candidates on kvm-userspace. And avi is a nice guy, let's be nice with him. Based on a patch by Yaniv Kamay Signed-off-by: Glauber Costa CC: Yaniv Kamay CC: Dor Laor --- hw/hw.h | 1 + savevm.c | 5 +++++ 2 files changed, 6 insertions(+), 0 deletions(-) diff --git a/hw/hw.h b/hw/hw.h index eab7bb4..e9628d4 100644 --- a/hw/hw.h +++ b/hw/hw.h @@ -67,6 +67,7 @@ unsigned int qemu_get_be32(QEMUFile *f); uint64_t qemu_get_be64(QEMUFile *f); int qemu_file_rate_limit(QEMUFile *f); int qemu_file_has_error(QEMUFile *f); +void qemu_file_set_error(QEMUFile *f); /* Try to send any outstanding data. This function is useful when output is * halted due to rate limiting or EAGAIN errors occur as it can be used to diff --git a/savevm.c b/savevm.c index ce12628..9f81d07 100644 --- a/savevm.c +++ b/savevm.c @@ -370,6 +370,11 @@ int qemu_file_has_error(QEMUFile *f) return f->has_error; } +void qemu_file_set_error(QEMUFile *f) +{ + f->has_error = 1; +} + void qemu_fflush(QEMUFile *f) { if (!f->put_buffer) -- 1.5.6.6