diff options
author | Juan Quintela <quintela@redhat.com> | 2012-07-20 13:13:59 +0200 |
---|---|---|
committer | Juan Quintela <quintela@redhat.com> | 2012-10-17 18:34:58 +0200 |
commit | 2c9adcb850bba7a24caec4d666dc01deca9f7649 (patch) | |
tree | 4ca3bc645e4ae1c5f09f5160f21d3021c1d36181 /buffered_file.c | |
parent | c87b015bc71734db74f5bdffeda122a224c75bbb (diff) | |
download | qemu-2c9adcb850bba7a24caec4d666dc01deca9f7649.zip qemu-2c9adcb850bba7a24caec4d666dc01deca9f7649.tar.gz qemu-2c9adcb850bba7a24caec4d666dc01deca9f7649.tar.bz2 |
buffered_file: unfold migrate_fd_put_ready
We only use 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.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/buffered_file.c b/buffered_file.c index 702a726..4c6a797 100644 --- a/buffered_file.c +++ b/buffered_file.c @@ -23,7 +23,6 @@ typedef struct QEMUFileBuffered { - BufferedPutReadyFunc *put_ready; BufferedWaitForUnfreezeFunc *wait_for_unfreeze; BufferedCloseFunc *close; MigrationState *migration_state; @@ -128,7 +127,7 @@ static int buffered_put_buffer(void *opaque, const uint8_t *buf, int64_t pos, in DPRINTF("file is ready\n"); if (!s->freeze_output && s->bytes_xfer < s->xfer_limit) { DPRINTF("notifying client\n"); - s->put_ready(s->migration_state); + migrate_fd_put_ready(s->migration_state); } } @@ -227,7 +226,6 @@ static void buffered_rate_tick(void *opaque) QEMUFile *qemu_fopen_ops_buffered(MigrationState *migration_state, size_t bytes_per_sec, - BufferedPutReadyFunc *put_ready, BufferedWaitForUnfreezeFunc *wait_for_unfreeze, BufferedCloseFunc *close) { @@ -237,7 +235,6 @@ QEMUFile *qemu_fopen_ops_buffered(MigrationState *migration_state, s->migration_state = migration_state; s->xfer_limit = bytes_per_sec / 10; - s->put_ready = put_ready; s->wait_for_unfreeze = wait_for_unfreeze; s->close = close; |