mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
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:
parent
9229bf3c2d
commit
70eb633034
3 changed files with 41 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue