Skip to contentSkip to conversation

[6998] create qemu_file_set_error (Glauber Costa)

Qemu-devel Anthony Liguori 1 participant 1 message Apr 5, 2009

lore
Share & tools
lore
#0 lore raw

Revision: 6998

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6998
Author:   aliguori
Date:     2009-04-05 19:30:51 +0000 (Sun, 05 Apr 2009)

Log Message:
-----------
create qemu_file_set_error (Glauber Costa)

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

Modified Paths:
--------------
trunk/hw/hw.h
trunk/savevm.c

Modified: trunk/hw/hw.h
===================================================================

hw/hw.h +1 -0
@@ -67,6 +67,7 @@
 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

Modified: trunk/savevm.c
===================================================================

savevm.c +5 -0
@@ -370,6 +370,11 @@
     return f->has_error;
 }
 
+void qemu_file_set_error(QEMUFile *f)
+{
+    f->has_error = 1;
+}
+
 void qemu_fflush(QEMUFile *f)
 {
     if (!f->put_buffer)