aboutsummaryrefslogtreecommitdiff
path: root/buffered_file.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2012-08-08 10:20:18 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2012-11-02 18:34:59 +0100
commit70eb6330343ebc61e5fb22be3d137df40f4bb058 (patch)
tree89eb7025e8d55fe6497a754ae75e8b053d6d7193 /buffered_file.c
parent9229bf3c2d7afcd1adce7258843d9bc82b066b08 (diff)
downloadqemu-70eb6330343ebc61e5fb22be3d137df40f4bb058.zip
qemu-70eb6330343ebc61e5fb22be3d137df40f4bb058.tar.gz
qemu-70eb6330343ebc61e5fb22be3d137df40f4bb058.tar.bz2
migration: add qemu_get_fd
Reviewed-by: Orit Wasserman <owasserm@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'buffered_file.c')
-rw-r--r--buffered_file.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/buffered_file.c b/buffered_file.c
index a5c0b12..bd0f61d 100644
--- a/buffered_file.c
+++ b/buffered_file.c
@@ -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,