aboutsummaryrefslogtreecommitdiff
path: root/buffered_file.c
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2012-07-20 13:10:54 +0200
committerJuan Quintela <quintela@redhat.com>2012-10-17 18:34:58 +0200
commitc87b015bc71734db74f5bdffeda122a224c75bbb (patch)
tree4bfa63e628b8e5ea0e7f927278a8eb2081041129 /buffered_file.c
parentc7a8f0cdd25ed552e6dba124877bd3364054c55c (diff)
downloadqemu-c87b015bc71734db74f5bdffeda122a224c75bbb.zip
qemu-c87b015bc71734db74f5bdffeda122a224c75bbb.tar.gz
qemu-c87b015bc71734db74f5bdffeda122a224c75bbb.tar.bz2
buffered_file: unfold migrate_fd_put_buffer
We only used it once, just remove the callback indirection Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'buffered_file.c')
-rw-r--r--buffered_file.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/buffered_file.c b/buffered_file.c
index 59d952d..702a726 100644
--- a/buffered_file.c
+++ b/buffered_file.c
@@ -23,7 +23,6 @@
typedef struct QEMUFileBuffered
{
- BufferedPutFunc *put_buffer;
BufferedPutReadyFunc *put_ready;
BufferedWaitForUnfreezeFunc *wait_for_unfreeze;
BufferedCloseFunc *close;
@@ -78,8 +77,8 @@ static void buffered_flush(QEMUFileBuffered *s)
while (s->bytes_xfer < s->xfer_limit && offset < s->buffer_size) {
ssize_t ret;
- ret = s->put_buffer(s->migration_state, s->buffer + offset,
- s->buffer_size - offset);
+ ret = migrate_fd_put_buffer(s->migration_state, s->buffer + offset,
+ s->buffer_size - offset);
if (ret == -EAGAIN) {
DPRINTF("backend not ready, freezing\n");
s->freeze_output = 1;
@@ -228,7 +227,6 @@ static void buffered_rate_tick(void *opaque)
QEMUFile *qemu_fopen_ops_buffered(MigrationState *migration_state,
size_t bytes_per_sec,
- BufferedPutFunc *put_buffer,
BufferedPutReadyFunc *put_ready,
BufferedWaitForUnfreezeFunc *wait_for_unfreeze,
BufferedCloseFunc *close)
@@ -239,7 +237,6 @@ QEMUFile *qemu_fopen_ops_buffered(MigrationState *migration_state,
s->migration_state = migration_state;
s->xfer_limit = bytes_per_sec / 10;
- s->put_buffer = put_buffer;
s->put_ready = put_ready;
s->wait_for_unfreeze = wait_for_unfreeze;
s->close = close;