aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2011-10-25 19:18:58 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2011-11-01 16:52:05 -0500
commitfa39a30fe4b92adb77178f388947da922d41648d (patch)
tree308105d5ed36093095a1076b53e19ef7708fdf87
parentdb9eae1c49fe2766a7709d7b2c4cdfcd91b9c25b (diff)
downloadqemu-fa39a30fe4b92adb77178f388947da922d41648d.zip
qemu-fa39a30fe4b92adb77178f388947da922d41648d.tar.gz
qemu-fa39a30fe4b92adb77178f388947da922d41648d.tar.bz2
savevm: qemu_fille_buffer() used to return one error for reads of size 0.
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r--savevm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/savevm.c b/savevm.c
index f01838f..bee16c0 100644
--- a/savevm.c
+++ b/savevm.c
@@ -476,6 +476,8 @@ static void qemu_fill_buffer(QEMUFile *f)
if (len > 0) {
f->buf_size += len;
f->buf_offset += len;
+ } else if (len == 0) {
+ f->last_error = -EIO;
} else if (len != -EAGAIN)
f->last_error = len;
}