Commit c29110d5 authored by Eduardo Habkost's avatar Eduardo Habkost Committed by Anthony Liguori
Browse files

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: default avatarEduardo Habkost <ehabkost@redhat.com>
Signed-off-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
parent 98d23704
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment