From fa39a30fe4b92adb77178f388947da922d41648d Mon Sep 17 00:00:00 2001 From: Juan Quintela Date: Tue, 25 Oct 2011 19:18:58 +0200 Subject: [PATCH] savevm: qemu_fille_buffer() used to return one error for reads of size 0. Signed-off-by: Juan Quintela Signed-off-by: Anthony Liguori --- savevm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/savevm.c b/savevm.c index f01838fb2d..bee16c0b7b 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; }