summaryrefslogtreecommitdiff
path: root/buffered_file.c
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2011-10-05 01:02:52 +0200
committerJuan Quintela <quintela@redhat.com>2011-10-20 13:23:52 +0200
commit624b9cc20922fe7b046cd79c839d1f3a5a5fc27e (patch)
treeee5789c0a6966b697caf48b463f95602ecbc94ea /buffered_file.c
parent3934638539c763ad23026b70483e60be34078c57 (diff)
migration: rename qemu_file_has_error to qemu_file_get_error
Now the function returned errno, so it is better the new name. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'buffered_file.c')
-rw-r--r--buffered_file.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/buffered_file.c b/buffered_file.c
index 94ca8d11f0..41c659cbd8 100644
--- a/buffered_file.c
+++ b/buffered_file.c
@@ -72,7 +72,7 @@ static void buffered_flush(QEMUFileBuffered *s)
{
size_t offset = 0;
- if (qemu_file_has_error(s->file)) {
+ if (qemu_file_get_error(s->file)) {
DPRINTF("flush when error, bailing\n");
return;
}
@@ -113,7 +113,7 @@ static int buffered_put_buffer(void *opaque, const uint8_t *buf, int64_t pos, in
DPRINTF("putting %d bytes at %" PRId64 "\n", size, pos);
- if (qemu_file_has_error(s->file)) {
+ if (qemu_file_get_error(s->file)) {
DPRINTF("flush when error, bailing\n");
return -EINVAL;
}
@@ -172,7 +172,7 @@ static int buffered_close(void *opaque)
DPRINTF("closing\n");
- while (!qemu_file_has_error(s->file) && s->buffer_size) {
+ while (!qemu_file_get_error(s->file) && s->buffer_size) {
buffered_flush(s);
if (s->freeze_output)
s->wait_for_unfreeze(s->opaque);
@@ -198,7 +198,7 @@ static int buffered_rate_limit(void *opaque)
{
QEMUFileBuffered *s = opaque;
- if (qemu_file_has_error(s->file)) {
+ if (qemu_file_get_error(s->file)) {
return -1;
}
if (s->freeze_output)
@@ -213,9 +213,9 @@ static int buffered_rate_limit(void *opaque)
static int64_t buffered_set_rate_limit(void *opaque, int64_t new_rate)
{
QEMUFileBuffered *s = opaque;
- if (qemu_file_has_error(s->file))
+ if (qemu_file_get_error(s->file)) {
goto out;
-
+ }
if (new_rate > SIZE_MAX) {
new_rate = SIZE_MAX;
}
@@ -237,7 +237,7 @@ static void buffered_rate_tick(void *opaque)
{
QEMUFileBuffered *s = opaque;
- if (qemu_file_has_error(s->file)) {
+ if (qemu_file_get_error(s->file)) {
buffered_close(s);
return;
}