aboutsummaryrefslogtreecommitdiff
path: root/savevm.c
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2011-11-10 10:41:39 -0200
committerAnthony Liguori <aliguori@us.ibm.com>2011-12-12 11:47:19 -0600
commitc29110d515babdff1f777189a84993b77722cd8f (patch)
tree0b0a29bdba4e33729a8287a1f906886046c8b78b /savevm.c
parent98d23704138e0be17a3ed9eb2631077bf92cc028 (diff)
savevm: use qemu_file_set_error() instead of setting last_error directly
Some code uses qemu_file_set_error() already, so use it everywhere when setting last_error, for consistency. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'savevm.c')
-rw-r--r--savevm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/savevm.c b/savevm.c
index 1a21ab441f..e12109602f 100644
--- a/savevm.c
+++ b/savevm.c
@@ -448,7 +448,7 @@ void qemu_fflush(QEMUFile *f)
if (len > 0)
f->buf_offset += f->buf_index;
else
- f->last_error = -EINVAL;
+ qemu_file_set_error(f, -EINVAL);
f->buf_index = 0;
}
}
@@ -479,7 +479,7 @@ static void qemu_fill_buffer(QEMUFile *f)
} else if (len == 0) {
f->last_error = -EIO;
} else if (len != -EAGAIN)
- f->last_error = len;
+ qemu_file_set_error(f, len);
}
int qemu_fclose(QEMUFile *f)