migration: add qemu_get_fd

Reviewed-by: Orit Wasserman <owasserm@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Paolo Bonzini 2012-08-08 10:20:18 +02:00
parent 9229bf3c2d
commit 70eb633034
3 changed files with 41 additions and 0 deletions

View file

@ -174,6 +174,13 @@ static int buffered_close(void *opaque)
* 1: Time to stop
* negative: There has been an error
*/
static int buffered_get_fd(void *opaque)
{
QEMUFileBuffered *s = opaque;
return qemu_get_fd(s->file);
}
static int buffered_rate_limit(void *opaque)
{
QEMUFileBuffered *s = opaque;
@ -235,6 +242,7 @@ static void buffered_rate_tick(void *opaque)
}
static const QEMUFileOps buffered_file_ops = {
.get_fd = buffered_get_fd,
.put_buffer = buffered_put_buffer,
.close = buffered_close,
.rate_limit = buffered_rate_limit,