Commit 4dabe24883ed9e538266a5deee7e2d1f1922208c

Authored by aliguori
1 parent b161d123

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

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/trunk@6998 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 2 changed files with 6 additions and 0 deletions
... ... @@ -67,6 +67,7 @@ unsigned int qemu_get_be32(QEMUFile *f);
67 67 uint64_t qemu_get_be64(QEMUFile *f);
68 68 int qemu_file_rate_limit(QEMUFile *f);
69 69 int qemu_file_has_error(QEMUFile *f);
  70 +void qemu_file_set_error(QEMUFile *f);
70 71  
71 72 /* Try to send any outstanding data. This function is useful when output is
72 73 * halted due to rate limiting or EAGAIN errors occur as it can be used to
... ...
savevm.c
... ... @@ -370,6 +370,11 @@ int qemu_file_has_error(QEMUFile *f)
370 370 return f->has_error;
371 371 }
372 372  
  373 +void qemu_file_set_error(QEMUFile *f)
  374 +{
  375 + f->has_error = 1;
  376 +}
  377 +
373 378 void qemu_fflush(QEMUFile *f)
374 379 {
375 380 if (!f->put_buffer)
... ...