]> rtime.felk.cvut.cz Git - lisovros/qemu_apohw.git/commitdiff
create qemu_file_set_error (Glauber Costa)
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>
Sun, 5 Apr 2009 19:33:37 +0000 (19:33 +0000)
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>
Sun, 5 Apr 2009 19:33:37 +0000 (19:33 +0000)
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 <glommer@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/branches/stable_0_10@7001 c046a42c-6fe2-441c-8c8c-71466251a162

hw/hw.h
savevm.c

diff --git a/hw/hw.h b/hw/hw.h
index eab7bb4db1ccb0e1825be7adee2b9f2b5a18c057..e9628d46fb42dee6bea579f2855fff25b7caddf5 100644 (file)
--- 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
index 3b4941448bfb135a6b11313cea410c94f9125dd0..f2463e780ef028711cd321472ad974acdc883497 100644 (file)
--- a/savevm.c
+++ b/savevm.c
@@ -366,6 +366,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)