aboutsummaryrefslogtreecommitdiff
path: root/buffered_file.c
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2011-09-21 23:01:54 +0200
committerJuan Quintela <quintela@redhat.com>2011-10-20 13:23:52 +0200
commitdcd1d224dfcad1154a516e683ab55ea848497f50 (patch)
tree41ff40193382ba0ad72dba2116a43c359935ce8e /buffered_file.c
parentaf509450816d17b4cbfff673be21b830f05018fc (diff)
migration: change has_error to contain errno values
We normally already have an errno value. When not, abuse EIO. Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'buffered_file.c')
-rw-r--r--buffered_file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/buffered_file.c b/buffered_file.c
index 4f4976387a..94ca8d11f0 100644
--- a/buffered_file.c
+++ b/buffered_file.c
@@ -92,7 +92,7 @@ static void buffered_flush(QEMUFileBuffered *s)
if (ret <= 0) {
DPRINTF("error flushing data, %zd\n", ret);
- qemu_file_set_error(s->file);
+ qemu_file_set_error(s->file, ret);
break;
} else {
DPRINTF("flushed %zd byte(s)\n", ret);
@@ -138,7 +138,7 @@ static int buffered_put_buffer(void *opaque, const uint8_t *buf, int64_t pos, in
if (ret <= 0) {
DPRINTF("error putting\n");
- qemu_file_set_error(s->file);
+ qemu_file_set_error(s->file, ret);
offset = -EINVAL;
break;
}