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>
This commit is contained in:
Juan Quintela 2011-10-25 19:18:58 +02:00 committed by Anthony Liguori
parent db9eae1c49
commit fa39a30fe4

View File

@ -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;
}